Hi Ruby folks.

When testing the fcgi module I noticed that TOPLEVEL_BINDING seems to be
broken in Ruby 1.9.

As soon as you eval something in TOPLEVEL_BINDING Ruby segfaults:

irb(main):001:0> TOPLEVEL_BINDING
=> #<Binding:0x402b4074>

irb(main):002:0> eval('puts "Hello!"', TOPLEVEL_BINDING)
(irb):2: [BUG] Segmentation fault
ruby 1.9.0 (2004-05-27) [i686-linux-gnu]

FCGI uses this to eval class defining code within the binding. However
replacing TOPLEVEL_BINDING with a global variable like $toplevel_binding
which is defined from binding at the beginning of the file just works fine
and fixes the problem.

Any comments on this?

Still Ruby is a very nice piece of work. =D

Bye,
phil
-- 
Please send replies (not followups) to the address set in Reply-To.
Philipp Kern - PK2186-RIPE - http://www.philkern.de