From 374fac74822f817172adda3799ac006b0ce45f0b Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 1 Mar 2008 15:51:04 +0000 Subject: [PATCH] add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_literal.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/ruby/test_literal.rb b/test/ruby/test_literal.rb index 70aad3604f..9210e25894 100644 --- a/test/ruby/test_literal.rb +++ b/test/ruby/test_literal.rb @@ -17,10 +17,13 @@ class TestRubyLiteral < Test::Unit::TestCase assert_instance_of Fixnum, 1_2_3_4 assert_equal '18', 0x12.inspect assert_instance_of Fixnum, 0x12 + assert_raise(SyntaxError) { eval("0x") } assert_equal '15', 0o17.inspect assert_instance_of Fixnum, 0o17 + assert_raise(SyntaxError) { eval("0o") } assert_equal '5', 0b101.inspect assert_instance_of Fixnum, 0b101 + assert_raise(SyntaxError) { eval("0b") } assert_equal '123456789012345678901234567890', 123456789012345678901234567890.inspect assert_instance_of Bignum, 123456789012345678901234567890 assert_instance_of Float, 1.3