Error when getting binding for a method via converting it to a Proc
Not sure if this is allowed in Ruby 1.9.1 but from a poll on #ruby-lang it seems like it works in 1.8. I am running 1.9.1p243 and the following throws an argument error:
a = 'apple'
puts 'inside bar'
obj = Foo.new
pro = obj.method(:bar).to_proc
pro.call # 'inside bar'
b = pro.binding # Can't create Binding from C level Proc (ArgumentError)
- Status changed from Open to Closed
Applied in changeset r25015.
- Status changed from Closed to Assigned
- Assignee set to yugui (Yuki Sonoda)
- Priority changed from 5 to Normal
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r26014.
Todd, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- Related to Bug #10428: Segmentation fault when modifying local variables of binding obtained from the result of Method#to_proc added
Also available in: Atom