Project

General

Profile

Actions

Bug #10707

closed

Segmentation fault when get refined new method in BasicObject

Added by hanachin (Seiei Miyagi) about 9 years ago. Updated almost 9 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0dev (2015-01-07 trunk 49171) [x86_64-darwin13]
[ruby-core:67389]

Description

following code cause SEGV in ruby-trunk, 2.2.0, 2.1.5

module RefinementBug
  refine BasicObject do
    def foo
    end
  end
end

method(:foo)

it should be raise NameError like:

/Users/hanachin/tmp/bug.rb:8:in `method': undefined method `foo' for class `Object' (NameError)
	from /Users/hanachin/tmp/bug.rb:8:in `<main>'

Files

bug.rb (89 Bytes) bug.rb hanachin (Seiei Miyagi), 01/07/2015 12:56 PM
miniruby_2015-01-07-215224_Module.crash (10.4 KB) miniruby_2015-01-07-215224_Module.crash hanachin (Seiei Miyagi), 01/07/2015 12:56 PM
0001-vm_method.c-no-klass-no-method-entry.patch (1.37 KB) 0001-vm_method.c-no-klass-no-method-entry.patch hanachin (Seiei Miyagi), 01/07/2015 01:02 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0