[ruby-cvs:67079] usa:r59901 (ruby_2_2): merge revision(s) 58453, 58454: [Backport #13499]

usa at ruby-lang.org usa at ruby-lang.org
Thu Sep 14 20:35:52 JST 2017


usa	2017-09-14 20:35:52 +0900 (Thu, 14 Sep 2017)

  New Revision: 59901

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59901

  Log:
    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.

  Modified directories:
    branches/ruby_2_2/
  Modified files:
    branches/ruby_2_2/ChangeLog
    branches/ruby_2_2/sprintf.c
    branches/ruby_2_2/test/ruby/test_sprintf.rb
    branches/ruby_2_2/version.h


More information about the ruby-cvs mailing list