LAMBEAU Bernard wrote: > > I'm not sure that what I want makes sense because I've got self inside > the block, but if anyone knows how to make this code working in Ruby > 1.9, I'm still interested. > class A def doit(&block) instance_eval(&block) end def sayhello(who) puts "hello #{who}: #{object_id}" end end A.new.doit do |who| sayhello("me") who.sayhello("who") end #=> hello me: 35747370 hello who: 35747370 -- Posted via http://www.ruby-forum.com/.