Fix for sprintf test exceeding bounds with MRB_INT16

This commit is contained in:
Tomasz Dąbrowski
2016-11-21 00:37:03 +01:00
parent 3ce51cbc7c
commit 4289e0cd81
+1 -1
View File
@@ -5,5 +5,5 @@ assert('String#%') do
assert_equal "one=1", "one=%d" % 1
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 16, ("%b" % (1<<15)).size
assert_equal 15, ("%b" % (1<<14)).size
end