[ruby-cvs:65625] nobu:r58453 (trunk): Fix space flag when Inf/NaN and width==3

nobu at ruby-lang.org nobu at ruby-lang.org
Sun Apr 23 10:04:39 JST 2017


nobu	2017-04-23 10:04:39 +0900 (Sun, 23 Apr 2017)

  New Revision: 58453

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

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

  Modified files:
    trunk/sprintf.c
    trunk/test/ruby/test_sprintf.rb


More information about the ruby-cvs mailing list