diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-09 14:46:24 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-09 14:46:24 +0000 |
commit | 51351b8f77afa1d06957ce64847032769fd98e83 (patch) | |
tree | 37220a32bfbe9954871f8815b862699834b489c8 /ext | |
parent | 4a3da1fbba2c64d0fcb5da2fe7cc33b2bd808d0b (diff) |
merge revision(s) 58453,58454: [Backport #13499]
Fix space flag when Inf/NaN and width==3
* sprintf.c (rb_str_format): while `"% 2f"` and `"% 4f"` result in
`" Inf"` and `" Inf"` respectively, `"% 3f"` results in
`"Inf"` (no space).
Refactor "%f" % Inf/NaN
* sprintf.c (rb_str_format): as for non-finite float, calculate
the exact needed size with the space flag.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@58625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
0 files changed, 0 insertions, 0 deletions