Commit 4289e0cd authored by Tomasz Dąbrowski's avatar Tomasz Dąbrowski

Fix for sprintf test exceeding bounds with MRB_INT16

parent 3ce51cbc
...@@ -5,5 +5,5 @@ assert('String#%') do ...@@ -5,5 +5,5 @@ assert('String#%') do
assert_equal "one=1", "one=%d" % 1 assert_equal "one=1", "one=%d" % 1
assert_equal "1 one 1.0", "%d %s %3.1f" % [ 1, "one", 1.01 ] assert_equal "1 one 1.0", "%d %s %3.1f" % [ 1, "one", 1.01 ]
assert_equal "123 < 456", "%{num} < %<str>s" % { num: 123, str: "456" } assert_equal "123 < 456", "%{num} < %<str>s" % { num: 123, str: "456" }
assert_equal 16, ("%b" % (1<<15)).size assert_equal 15, ("%b" % (1<<14)).size
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment