[#69084] [Ruby trunk - Feature #11124] [Open] [PATCH] lib/*: use monotonic clock for timeouts — normalperson@...
Issue #11124 has been reported by Eric Wong.
5 messages
2015/05/06
[#69138] [Ruby trunk - Feature #11136] [PATCH] webrick: avoid fcntl module — nobu@...
Issue #11136 has been updated by Nobuyoshi Nakada.
3 messages
2015/05/12
[#69160] [Ruby trunk - Feature #11146] [PATCH] variable.c: initialize generic_iv_tbl at start — nobu@...
Issue #11146 has been updated by Nobuyoshi Nakada.
4 messages
2015/05/13
[#69175] Re: [Ruby trunk - Feature #11146] [PATCH] variable.c: initialize generic_iv_tbl at start
— Eric Wong <normalperson@...>
2015/05/13
nobu@ruby-lang.org wrote:
[ruby-core:69276] [Ruby trunk - Bug #10432] wrong receiver of Binding from Method
From:
ko1@...
Date:
2015-05-21 03:04:04 UTC
List:
ruby-core #69276
Issue #10432 has been updated by Koichi Sasada.
> Methodオブジェクトからto_proc.bindingで作られたBindingのreceiverが、Methodオブジェクトの元になったオブジェクトではなく、Methodオブジェクトになっています。
元々、なんでこれじゃいけないんでしたっけ。
1.8 だと、Method オブジェクトになったのかな。
----------------------------------------
Bug #10432: wrong receiver of Binding from Method
https://bugs.ruby-lang.org/issues/10432#change-52532
* Author: Nobuyoshi Nakada
* Status: Closed
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* ruby -v: trunk
* Backport: 2.0.0: DONE, 2.1: DONE
----------------------------------------
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/