From: Intransition Date: 2011-09-28T11:01:34+09:00 Subject: [ruby-core:39757] Re: [Ruby 1.9 - Feature #5360] BasicObject#binding On Sep 27, 3:51�pm, George Koehler wrote: > Issue #5360 has been updated by George Koehler. > > I can get a Binding from a BasicObject like so: > > �class Cow < BasicObject > � �Moo = "Moooo!" > � �def binding > � � �::Kernel.binding > � �end > �end > > �b = Cow.new.binding > �p eval("Moo", b) � � � �# => "Moooo!" > �p eval("String", b) � � # raises NameError > > This uses the syntax "::Kernel" to access a global constant. Ah, ok. Didn't realize that could be done. It's one of those goofy methods like Module.nesting.