From: Tanaka Akira Date: 2005-07-30T12:19:55+09:00 Subject: Re: [BUG] takes -1, not 0, arguments In article <2572ec7805072905422866d465@mail.gmail.com>, Ramzi Ferchichi writes: > I got this bug on my system running Ubuntu (breezy): > > /usr/lib/ruby/1.8/date/format.rb:598: [BUG] unknown node type 0 > ruby 1.8.3 (2005-06-23) [i486-linux] Although the bug is too hard to fix without a script to reproduce it, following patch may show bit more information. Index: eval.c =================================================================== RCS file: /src/ruby/eval.c,v retrieving revision 1.616.2.114 diff -u -p -r1.616.2.114 eval.c --- eval.c 29 Jul 2005 01:00:07 -0000 1.616.2.114 +++ eval.c 30 Jul 2005 03:13:02 -0000 @@ -2806,7 +2806,15 @@ unknown_node(node) NODE *volatile node; { ruby_current_node = 0; - rb_bug("unknown node type %d", nd_type(node)); + if (node->flags == 0) { + rb_bug("terminated node (0x%lx)", node); + } + else if (BUILTIN_TYPE(node) != T_NODE) { + rb_bug("not a node 0x%02lx (0x%lx)", BUILTIN_TYPE(node), node); + } + else { + rb_bug("unknown node type %d (0x%lx)", nd_type(node), node); + } } static VALUE -- Tanaka Akira