[#66126] Creation/Conversion methods/functions table for Ruby types — SASADA Koichi <ko1@...>
Hi,
5 messages
2014/11/07
[#66248] [ruby-trunk - Feature #10423] [PATCH] opt_str_lit*: avoid literal string allocations — normalperson@...
Issue #10423 has been updated by Eric Wong.
3 messages
2014/11/13
[#66595] [ruby-trunk - Bug #10557] [Open] Block not given when the argument is a string — bartosz@...
Issue #10557 has been reported by Bartosz Kopinski.
3 messages
2014/11/30
[ruby-core:66541] [ruby-trunk - Bug #10432] wrong receiver of Binding from Method
From:
usa@...
Date:
2014-11-28 07:22:08 UTC
List:
ruby-core #66541
Issue #10432 has been updated by Usaku NAKAMURA.
Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: DONE, 2.1: REQUIRED
Backported into `ruby_2_0_0` at r48633.
(元のレポートにもあるように2.0.0にはBinding#receiverがないため、テストを一部変更)
----------------------------------------
Bug #10432: wrong receiver of Binding from Method
https://bugs.ruby-lang.org/issues/10432#change-50156
* Author: Nobuyoshi Nakada
* Status: Closed
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* Category: core
* Target version: current: 2.2.0
* ruby -v: trunk
* Backport: 2.0.0: DONE, 2.1: REQUIRED
----------------------------------------
Methodオブジェクトから`to_proc.binding`で作られたBindingのreceiverが、Methodオブジェクトの元になったオブジェクトではなく、Methodオブジェクトになっています。
~~~ruby
class C
def foo;end
end
o = C.new
m = o.method(:foo)
p m.receiver # #<C:0x007fcada074e58>
p m.to_proc.binding.receiver # #<Method: C#foo>
~~~
2.0, 2.1では`Binding#receiver`はありませんが、`eval("self")`で同様の結果になります。
--
https://bugs.ruby-lang.org/