Project

General

Profile

Actions

Bug #10885

closed

Segmentation fault when calling refined method in duplicate module

Added by ktsj (Kazuki Tsujimoto) about 9 years ago. Updated about 9 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0dev (2015-02-22) [x86_64-linux]
[ruby-dev:48878]

Description

以下のコードでSEGVします。
Moduleをdupする時にcrefをコピーしていますが、その中でnd_refinementsを設定していないのが原因です。

module M
  refine BasicObject do
    def __id__
    end
  end

  class << self
    def m
      __id__
    end
  end
end

M.dup.m
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0