[#65451] [ruby-trunk - Feature #10333] [PATCH 3/1] optimize: "yoda literal" == string — ko1@...

Issue #10333 has been updated by Koichi Sasada.

9 messages 2014/10/07

[ruby-core:65915] [Backport191 - Backport #2099] Error when getting binding for a method via converting it to a Proc

From: nobu@...
Date: 2014-10-27 03:30:24 UTC
List: ruby-core #65915
Issue #2099 has been updated by Nobuyoshi Nakada.

Related to Bug #10428: Segmentation fault when modifying local variables of binding obtained from the result of Method#to_proc added

----------------------------------------
Backport #2099: Error when getting binding for a method via converting it to a Proc
https://bugs.ruby-lang.org/issues/2099#change-49651

* Author: Todd A
* Status: Closed
* Priority: Normal
* Assignee: Yuki Sonoda
----------------------------------------
=begin
 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:
 
 class Foo
   def bar
     a = 'apple'
     b= 22
     puts 'inside bar'
   end
 end
 
 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)
=end




-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next