summaryrefslogtreecommitdiff
path: root/test/ruby/test_literal.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-16 15:07:23 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-16 15:12:12 +0900
commit69a7eaae389b49eb2a99c1c44c11b3d5004d186f (patch)
tree2b7d806fea1668b513534f1c42cd10ed3c62506e /test/ruby/test_literal.rb
parent05c9dfe23a7d1b970f5b62feeba3199413567fa5 (diff)
Use `to_s` and `puts` in tests
`to_s` has the explict specification while `inspect` is often vague.
Diffstat (limited to 'test/ruby/test_literal.rb')
-rw-r--r--test/ruby/test_literal.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_literal.rb b/test/ruby/test_literal.rb
index 8c3256c034..99dd3a0c56 100644
--- a/test/ruby/test_literal.rb
+++ b/test/ruby/test_literal.rb
@@ -26,7 +26,7 @@ class TestRubyLiteral < Test::Unit::TestCase
assert_equal '5', 0b101.inspect
assert_instance_of Integer, 0b101
assert_raise(SyntaxError) { eval("0b") }
- assert_equal '123456789012345678901234567890', 123456789012345678901234567890.inspect
+ assert_equal '123456789012345678901234567890', 123456789012345678901234567890.to_s
assert_instance_of Integer, 123456789012345678901234567890
assert_instance_of Float, 1.3
assert_equal '2', eval("0x00+2").inspect