Who else has seen this error?
[BUG] unknown node type 0
ruby 1.8.0 (2003-08-04) [i686-linux-gnu]
Aborted (core dumped)
I have seen it. I could reduce the problem to the following two files:
a.rb:
class A
end
b.rb:
require ‘test/unit’
class TC_A < Test::Unit::TestCase
require 'a'
def setup
@a = A.new
end
end
If I run b.rb, ruby dumps core. Here is the stacktrace:
#0 0x4009d7d1 in kill () from /lib/libc.so.6
(gdb) bt
#0 0x4009d7d1 in kill () from /lib/libc.so.6
#1 0x4009d58d in raise () from /lib/libc.so.6
#2 0x4009e994 in abort () from /lib/libc.so.6
#3 0x080cfcf3 in rb_bug (fmt=0x0) at error.c:197
#4 0x080594cd in rb_eval (self=1075979268, n=0x0) at eval.c:3623
#5 0x0805c2cc in rb_call0 (klass=1075978968, recv=1075979268, id=11721,
oid=0, argc=1, argv=0xbfffb4d8, body=0x4019c008, nosuper=0) at
eval.c:5037
#6 0x0805c8a1 in rb_call (klass=1075978968, recv=1075979268, mid=11721,
argc=1, argv=0xbfffb4d8, scope=1) at eval.c:5130
#7 0x08057ab6 in rb_eval (self=1075979268, n=0x0) at eval.c:2965
#8 0x0805744c in rb_eval (self=1075979268, n=0x0) at eval.c:3164
#9 0x0805c2cc in rb_call0 (klass=1075978968, recv=1075979268, id=11689,
oid=0, argc=0, argv=0x0, body=0x4019c3a0, nosuper=0) at eval.c:5037
#10 0x0805c8a1 in rb_call (klass=1075978968, recv=1075979268, mid=11689,
argc=0, argv=0x0, scope=2) at eval.c:5130
#11 0x08057ab6 in rb_eval (self=1075979268, n=0x0) at eval.c:2965
#12 0x0805c2cc in rb_call0 (klass=1075978968, recv=1075979268, id=5017,
oid=0,
argc=0, argv=0x0, body=0x4019c634, nosuper=0) at eval.c:5037
#13 0x0805c8a1 in rb_call (klass=1075978968, recv=1075979268, mid=5017,
argc=0, argv=0x0, scope=0) at eval.c:5130
#14 0x08057ab6 in rb_eval (self=1075978968, n=0x0) at eval.c:2965
#15 0x0805813e in rb_eval (self=1075978968, n=0x0) at eval.c:2913
#16 0x0805c2cc in rb_call0 (klass=1075978948, recv=1075978968, id=5097,
oid=0,
argc=0, argv=0xbfffd49c, body=0x4019cc4c, nosuper=0) at eval.c:5037
#17 0x0805c8a1 in rb_call (klass=1075978948, recv=1075978968, mid=5097,
argc=1, argv=0xbfffd498, scope=0) at eval.c:5130
#18 0x08057ab6 in rb_eval (self=1075624544, n=0x0) at eval.c:2965
#19 0x08057986 in rb_eval (self=1075624544, n=0x0) at eval.c:2958
#20 0x080573ef in rb_eval (self=1075624544, n=0x0) at eval.c:3154
#21 0x0805a5cf in rb_yield_0 (val=1075436344, self=1075624544, klass=2,
flags=1, avalue=2) at eval.c:4166
#22 0x0806106b in proc_invoke (proc=1075436244, args=1075436104, self=6,
klass=2) at ruby.h:627
#23 0x08061148 in proc_call (proc=0, args=0) at eval.c:7066
#24 0x08067cc2 in call_cfunc (func=0x8061120 <proc_call>,
recv=1075436244,
len=1075416704, argc=6, argv=0x2) at eval.c:4772
#25 0x0805c002 in rb_call0 (klass=1075566544, recv=1075436244, id=5201,
oid=0,
argc=1, argv=0xbfffe9f8, body=0x401bd744, nosuper=0) at eval.c:4909
#26 0x0805c8a1 in rb_call (klass=1075566544, recv=1075436244, mid=5201,
argc=1, argv=0xbfffe9f8, scope=0) at eval.c:5130
#27 0x08057ab6 in rb_eval (self=1075624544, n=0x0) at eval.c:2965
#28 0x0805a5cf in rb_yield_0 (val=1075437644, self=1075624544, klass=0,
flags=0, avalue=2) at eval.c:4166
#29 0x0806106b in proc_invoke (proc=1075463024, args=1075437644, self=6,
klass=2) at ruby.h:627
#30 0x0805f637 in call_end_proc (data=0) at eval.c:6429
#31 0x0805f98e in rb_exec_end_proc () at eval.c:6466
#32 0x08053ce0 in ruby_finalize_0 (exp=0xbffff740) at eval.c:1309
#33 0x08053e31 in ruby_cleanup (ex=0) at eval.c:1345
#34 0x08053f31 in ruby_stop (ex=0) at eval.c:1372
#35 0x08053f73 in ruby_run () at eval.c:1384
#36 0x08052153 in main (argc=0, argv=0x0, envp=0xbffff7d0) at main.c:50
#37 0x4008a707 in __libc_start_main () from /lib/libc.so.6
I’m on a quest to reproduce it reliably. Programmers often
have trouble reproducing. 
Yes, I have seen this bug before, but wanted to continue programming.
Later when I tried to find out what had happend, I couldn’t reproduce
the bug.
It’s a strange and subtle bug. The slightest change in an
unrelated part of the source code will make it go away.
Adding a (truly irrelevant) blank line or a commented line
will make it go away.
Yes, exactly. If the blank line between “class A” and “end” in
a.rb is deleted, ruby doesn’t crash anymore. It’s really weird…
···
On 2003-09-04 01:57:38 +0900, Hal Fulton wrote:
–
Were it left to me to decide whether we should have government without
newspapers or newspapers without government, I should not hesitate for a
moment to prefer the latter. But I should mean that every man should
receive those papers and be capable of reading them.
– Thomas Jefferson