Actions
Bug #11836
closedOptimized methods cannot be overridden after Module#prepend
Bug #11836:
Optimized methods cannot be overridden after Module#prepend
Description
It seems that optimized methods cannot overridden after Module#prepend.
module M
def /(other)
quo(other)
end
end
class Fixnum
prepend M
end
module M
def %(other)
0
end
def foo
puts "m#foo"
end
end
p 1 / 2 #=> (1/2) overridden
p 1 % 2 #=> 1 not overridden
1.foo #=> m#foo overridden
Is there any good way to disable optimization in this case?
Actions