Commit a3f8206c authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #3259 from dabroz/feature-16bitfix1

Fix for sprintf test exceeding bounds with MRB_INT16
parents 3ce51cbc 4289e0cd
...@@ -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