[ruby-cvs:66396] usa:r59218 (ruby_2_3): merge revision(s) 58453, 58454: [Backport #13499]

usa at ruby-lang.org usa at ruby-lang.org
Fri Jun 30 19:47:34 JST 2017


usa	2017-06-30 19:47:34 +0900 (Fri, 30 Jun 2017)

  New Revision: 59218

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

  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_3/
  Modified files:
    branches/ruby_2_3/ChangeLog
    branches/ruby_2_3/sprintf.c
    branches/ruby_2_3/test/ruby/test_sprintf.rb
    branches/ruby_2_3/version.h


More information about the ruby-cvs mailing list