--------------090208050509000704070300
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Moin.

Since ruby-breakpoint does not seem to work with Debian Unstable's Ruby 
which has merged back CVS changes I began looking into that issue with 
the kind help of Akira Yamada.

It appears that the CVS Head does no longer generate return events (in 
some circumstances?) where Ruby 1.8.2 still did. This breaks my 
implementation of Binding.of_caller which in turn causes the 
ruby-breakpoint library not to work anymore.

Is this by design?

I've attached the Binding.of_caller code to this mail, here is how it 
would be used:

def trace(var)
   Binding.of_caller do |context|
     value  val(var.to_s, context)
     puts ">> #{var}  {value.inspect}"
   end
end

x  
trace :x
x * 
trace :x
x ** 
trace :x

trace "x*x"

puts "Done!"

Regards,
Florian Gross

--------------090208050509000704070300
Content-Type: application/x-ruby;
 nameinding_of_caller.rb"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filenameinding_of_caller.rb"

Y2xhc3MgQ29udGludWF0aW9uICMgOm5vZG9jOg0KICBkZWYgc2VsZi5jcmVhdGUoKmFyZ3Ms
ICZibG9jaykgIyA6bm9kb2M6DQogICAgY2MgPSBuaWw7IHJlc3VsdCA9IGNhbGxjYyB7fGN8
IGNjID0gYzsgYmxvY2suY2FsbChjYykgaWYgYmxvY2sgYW5kIGFyZ3MuZW1wdHk/fQ0KICAg
IHJlc3VsdCB8fD0gYXJncw0KICAgIHJldHVybiAqW2NjLCAqcmVzdWx0XQ0KICBlbmQNCmVu
ZA0KDQpjbGFzcyBCaW5kaW5nOyBlbmQgIyBmb3IgUkRvYw0KIyBUaGlzIG1ldGhvZCByZXR1
cm5zIHRoZSBiaW5kaW5nIG9mIHRoZSBtZXRob2QgdGhhdCBjYWxsZWQgeW91cg0KIyBtZXRo
b2QuIEl0IHdpbGwgcmFpc2UgYW4gRXhjZXB0aW9uIHdoZW4geW91J3JlIG5vdCBpbnNpZGUg
YSBtZXRob2QuDQojDQojIEl0J3MgdXNlZCBsaWtlIHRoaXM6DQojICAgZGVmIGluY19jb3Vu
dGVy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