summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2012-12-29 01:02:05 -0800
committerYukihiro "Matz" Matsumoto <[email protected]>2012-12-29 01:02:05 -0800
commit50e3a53d7377c9cf94b70d553fe4060edcec8fc9 (patch)
treeb7f76ac65c7f8648e02e7687dbe5b295755eae01 /test
parentc836187cf27c058b9e8fd98814e9fc26f05640a5 (diff)
parent9219c856a8586fbda74fec526303d19c70290484 (diff)
downloadmruby-50e3a53d7377c9cf94b70d553fe4060edcec8fc9.tar.gz
mruby-50e3a53d7377c9cf94b70d553fe4060edcec8fc9.zip
Merge pull request #677 from skandhas/pr-add-Module-remove_method
Add Module#remove_method for mruby
Diffstat (limited to 'test')
-rw-r--r--test/t/module.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/t/module.rb b/test/t/module.rb
index deacb3309..bf9626c2d 100644
--- a/test/t/module.rb
+++ b/test/t/module.rb
@@ -217,6 +217,25 @@ assert('Module#remove_class_variable', '15.2.2.4.39') do
not Test4RemoveClassVariable.class_variables.include? :@@cv
end
+assert('Module#remove_method', '15.2.2.4.41') do
+ module Test4RemoveMethod
+ class Parent
+ def hello
+ end
+ end
+
+ class Child < Parent
+ def hello
+ end
+ end
+ end
+
+ Test4RemoveMethod::Child.class_eval{ remove_method :hello }
+
+ Test4RemoveMethod::Child.instance_methods.include? :hello and
+ not Test4RemoveMethod::Child.instance_methods(false).include? :hello
+end
+
# Not ISO specified