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

Fix for sprintf test exceeding bounds with MRB_INT16
This commit is contained in:
Yukihiro "Matz" Matsumoto
2016-11-21 10:22:47 +09:00
committed by GitHub
+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