summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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