summaryrefslogtreecommitdiff
path: root/test/ruby/test_symbol.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_symbol.rb')
-rw-r--r--test/ruby/test_symbol.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb
index f39883bafa..89b7b4f8c9 100644
--- a/test/ruby/test_symbol.rb
+++ b/test/ruby/test_symbol.rb
@@ -168,4 +168,8 @@ class TestSymbol < Test::Unit::TestCase
assert_equal(Encoding::UTF_8, "\u{2192}".intern.encoding)
assert_raise(EncodingError) {"\xb0a".force_encoding("utf-8").intern}
end
+
+ def test_singleton_method
+ assert_raise(TypeError) { a = :foo; def a.foo; end }
+ end
end