From: usa@... Date: 2015-02-25T06:27:46+00:00 Subject: [ruby-dev:48884] [Ruby trunk - Bug #10885] Segmentation fault when calling refined method in duplicate module Issue #10885 has been updated by Usaku NAKAMURA. Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE to 2.0.0: DONE, 2.1: REQUIRED, 2.2: DONE ruby_2_0_0 r49739 merged revision(s) 49685,49687. note: omitted the test because `Module#using` is not available on 2.0.0. ---------------------------------------- Bug #10885: Segmentation fault when calling refined method in duplicate module https://bugs.ruby-lang.org/issues/10885#change-51658 * Author: Kazuki Tsujimoto * Status: Closed * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0dev (2015-02-22) [x86_64-linux] * Backport: 2.0.0: DONE, 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/