summaryrefslogtreecommitdiffhomepage
path: root/test/t/module.rb
diff options
context:
space:
mode:
authorskandhas <[email protected]>2012-12-29 14:44:28 +0800
committerskandhas <[email protected]>2012-12-29 14:44:28 +0800
commit9219c856a8586fbda74fec526303d19c70290484 (patch)
treeb7f76ac65c7f8648e02e7687dbe5b295755eae01 /test/t/module.rb
parent779a73e7de17a970fab5418917b5b952293c85d0 (diff)
downloadmruby-9219c856a8586fbda74fec526303d19c70290484.tar.gz
mruby-9219c856a8586fbda74fec526303d19c70290484.zip
add test for Module#remove_method
Diffstat (limited to 'test/t/module.rb')
-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