[ruby-dev:48878] [Ruby trunk - Bug #10885] [Open] Segmentation fault when calling refined method in duplicate module
From:
kazuki@...
Date:
2015-02-22 06:54:50 UTC
List:
ruby-dev #48878
Issue #10885 has been reported by Kazuki Tsujimoto.
----------------------------------------
Bug #10885: Segmentation fault when calling refined method in duplicate module
https://bugs.ruby-lang.org/issues/10885
* Author: Kazuki Tsujimoto
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.3.0dev (2015-02-22) [x86_64-linux]
* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED
----------------------------------------
以下のコードでSEGVします。
Moduleをdupする時にcrefをコピーしていますが、その中でnd_refinementsを設定していないのが原因です。
~~~ruby
module M
refine BasicObject do
def __id__
end
end
class << self
def m
__id__
end
end
end
M.dup.m
~~~
--
https://bugs.ruby-lang.org/