summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2026-01-13 10:57:06 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2026-01-13 10:57:31 -0800
commit3176790c0d15dd7a72bb6e349651b3a66111d6f7 (patch)
tree96bbdc5e83da6ee371a65d0559423011211b672c
parente04267a14b1a5dea2d2c368e48d41bd3db441f4f (diff)
Add a test backport missed at a10f7fac1fb1dcbdb1ae41137bd7294764a34793
https://bugs.ruby-lang.org/issues/21831
-rw-r--r--test/ruby/test_literal.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_literal.rb b/test/ruby/test_literal.rb
index dbff3c4734..cff888d4b3 100644
--- a/test/ruby/test_literal.rb
+++ b/test/ruby/test_literal.rb
@@ -682,6 +682,11 @@ class TestRubyLiteral < Test::Unit::TestCase
$VERBOSE = verbose_bak
end
+ def test_rational_float
+ assert_equal(12, 0.12r * 100)
+ assert_equal(12, 0.1_2r * 100)
+ end
+
def test_symbol_list
assert_equal([:foo, :bar], %i[foo bar])
assert_equal([:"\"foo"], %i["foo])