aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_symbol.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-23 11:51:30 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-23 11:51:30 +0000
commit1e73d66f6b1f70f87e2745ed529e1840b03577dc (patch)
treefc38279b0d1da329d635229893c396cfd74d5aba /test/ruby/test_symbol.rb
parent6a80947a4b7ebb637602ae105ee9b2d20ae62fce (diff)
downloadruby-1e73d66f6b1f70f87e2745ed529e1840b03577dc.tar.gz
* test/ruby/test_fixnum.rb (TestFixnum#test_singleton_method): new test.
* test/ruby/test_bignum.rb (TestBignum#test_singleton_method): ditto. * test/ruby/test_float.rb (TestFloat#test_singleton_method): ditto. * test/ruby/test_symbol.rb (TestSymbol#test_singleton_method): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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