Project

General

Profile

Bug #10765 » bug.rb

hanachin (Seiei Miyagi), 01/21/2015 01:46 PM

 
class C
def foo
"C#foo"
end
end

module RefinementBug
refine C do
def foo
"RefinementBug#foo"
end
end
end

using RefinementBug

class C
remove_method :foo
end

puts C.new.foo

# expected:
# RefinementBug#foo
#
# actual:
# bug.rb:21:in `<main>': undefined method `foo' for #<C:0x007f9e5c087b48> (NoMethodError)
(2-2/3)