Commit 4c06646
committed
fix a bug in Module#remove_method which it could call undefined method if call it once
Test Code:
----
class Foo
def meth
end
end
obj = Foo.new
obj.meth
class Foo
remove_method :meth
end
p obj.meth
Result:
----
$ macruby test_remove.rb
nil
Expected:
----
$ ruby test_remove.rb
test_remove.rb:12:in `<main>': undefined method `meth' for #<Foo:0x007fad558b9cc8> (NoMethodError)1 parent b870681 commit 4c06646
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2871 | 2871 | | |
2872 | 2872 | | |
2873 | 2873 | | |
| 2874 | + | |
2874 | 2875 | | |
2875 | 2876 | | |
2876 | 2877 | | |
| |||
0 commit comments