summaryrefslogtreecommitdiff
path: root/test/ruby/test_method.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_method.rb')
-rw-r--r--test/ruby/test_method.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb
index 67c24a8fd8..fe0171dd57 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -790,6 +790,9 @@ class TestMethod < Test::Unit::TestCase
class << o; prepend Module.new; end
m = assert_nothing_raised(NameError, bug14658) {o.singleton_method(:bar)}
assert_equal(:bar, m.call, bug14658)
+
+ o = Object.new
+ assert_raise(NameError, bug14658) {o.singleton_method(:bar)}
end
Feature9783 = '[ruby-core:62212] [Feature #9783]'