From: naruse@... Date: 2015-02-24T01:52:38+00:00 Subject: [ruby-dev:48882] [Ruby trunk - Bug #10885] Segmentation fault when calling refined method in duplicate module Issue #10885 has been updated by Yui NARUSE. Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE ruby_2_2 r49708 merged revision(s) 49685,49687. ---------------------------------------- Bug #10885: Segmentation fault when calling refined method in duplicate module https://bugs.ruby-lang.org/issues/10885#change-51625 * Author: Kazuki Tsujimoto * Status: Closed * 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: DONE ---------------------------------------- 以下のコードで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/