-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 07 December 2003 11:47, Sean E. Russell wrote:
> If I want backwards compatibility, is the only fix to catch the exception?

Actually, ignore that.  Even loading that file breaks the tests, even if you 
catch the exception.  The fix is to check the version of Ruby, and load the 
file only if the Ruby version is less than 1.8.1.

In any case, I've just encountered something *really* wierd.

After fixing that Test::Unit issue, the unit tests worked fine with 1.8.1.  I 
then ran the unit tests with 1.6.8, to make sure they still worked -- they 
did; then I ran the tests with 1.8.0 to make sure *that* still worked -- and 
it did... then I ran the tests with 1.8.1 again, and it *failed* with:

ser@petra rexml/3.0% /opt/ruby/1.8.1/bin/ruby bin/suite.rb
REXML version = 2.7.2
Loaded suite REXML
Started
....................................................: [BUG] unknown node type 
0
ruby 1.8.1 (2003-12-05) [i686-linux]

zsh: abort      /opt/ruby/1.8.1/bin/ruby bin/suite.rb


Wow.  This is *really* bizarre.  Is libld reusing codespace or something?

My gcc is:

Thread model: posix
gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r3, propolice)


The relevant strace section appears to be:

read(3, "<?xml version=\"1.0\" encoding=\"UT"..., 4096) = 997
fstat64(3, {st_mode=S_IFREG|0664, st_size=997, ...}) = 0
_llseek(3, -959, [38], SEEK_CUR)        = 0
read(3, "\n\n\n<ProductionSupport version=\"1"..., 4096) = 959
read(3, "", 4096)                       = 0
stat64("/home/ser/lib/ruby/rexml/encodings/UTF-8.rb", 0xbffef610) = -1 ENOENT 
(No such file or directory)
stat64("/opt/ruby/1.8.1/lib/ruby/site_ruby/1.8/rexml/encodings/UTF-8.rb", 
0xbffef610) = -1 ENOENT (No such file or directory)
stat64("/opt/ruby/1.8.1/lib/ruby/site_ruby/1.8/i686-linux/rexml/encodings/
UTF-8.rb", 0xbffef610) = -1 ENOENT (No such file or directory)
stat64("/opt/ruby/1.8.1/lib/ruby/site_ruby/rexml/encodings/UTF-8.rb", 
0xbffef610) = -1 ENOENT (No such file or directory)
stat64("/opt/ruby/1.8.1/lib/ruby/1.8/rexml/encodings/UTF-8.rb", 
{st_mode=S_IFREG|0644, st_size=172, ...}) = 0
open("/opt/ruby/1.8.1/lib/ruby/1.8/rexml/encodings/UTF-8.rb", O_RDONLY|
O_LARGEFILE) = 4
close(4)                                = 0
open("/opt/ruby/1.8.1/lib/ruby/1.8/rexml/encodings/UTF-8.rb", O_RDONLY|
O_LARGEFILE) = 4
close(4)                                = 0
open("/opt/ruby/1.8.1/lib/ruby/1.8/rexml/encodings/UTF-8.rb", O_RDONLY|
O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=172, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x402e5000
read(4, "module REXML\n  module Encoding\n "..., 4096) = 172
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x402e5000, 4096)                = 0
brk(0)                                  = 0x8328000
brk(0)                                  = 0x8328000
brk(0x8308000)                          = 0x8308000
brk(0)                                  = 0x8308000
brk(0)                                  = 0x8308000
brk(0)                                  = 0x8308000
brk(0x82e8000)                          = 0x82e8000
brk(0)                                  = 0x82e8000
brk(0)                                  = 0x82e8000
brk(0)                                  = 0x82e8000
brk(0x82c8000)                          = 0x82c8000
brk(0)                                  = 0x82c8000
brk(0)                                  = 0x82c8000
brk(0)                                  = 0x82c8000
brk(0x82a8000)                          = 0x82a8000
brk(0)                                  = 0x82a8000
write(2, ": ", 2: )                       = 2
write(2, "[BUG] ", 6[BUG] )                   = 6
write(2, "unknown node type 0", 19unknown node type 0)     = 19
write(2, "\nruby 1.8.1 (2003-12-05) [i686-l"..., 39
ruby 1.8.1 (2003-12-05) [i686-linux]

) = 39
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
getpid()                                = 7045
kill(7045, SIGABRT)                     = 0
- --- SIGABRT (Aborted) @ 0 (0) ---
+++ killed by SIGABRT +++



- -- 
### SER   
### Deutsch|Esperanto|Francaise|Linux|XML|Java|Ruby|Aikido|Dirigibles
### http://www.germane-software.com/~ser  jabber.com:ser  ICQ:83578737 
### GPG: http://www.germane-software.com/~ser/Security/ser_public.gpg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/02B0P0KxygnleI8RAuKbAKDJs0yL+2A/HlbBHj33MZlLsntffwCfZJ/p
ZTr7nzHn/9rNdtwHhai4Gjs=
=ug66
-----END PGP SIGNATURE-----