Joel VanderWerf
9/2/2008 4:23:00 PM
Thomas B. wrote:
> eval("#here.",Object::new.instance_eval{binding})
>
> So when you def a method, it goes just to this sole instance.
$ cat foo.rb
def foo
puts "FOO"
end
class A
def bar
foo
end
end
A.new.bar
$ ruby foo.rb
FOO
--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407