aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r--test/ruby/test_module.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index aa48e1793c..d7a6248909 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -1290,4 +1290,13 @@ class TestModule < Test::Unit::TestCase
o.singleton_class.class_eval {prepend Module.new}
assert_equal([], o.singleton_methods)
end
+
+ def test_prepend_remove_method
+ assert_raise(NameError) do
+ Class.new do
+ prepend Module.new {def foo; end}
+ remove_method(:foo)
+ end
+ end
+ end
end