Project

General

Profile

Bug #8916

rb_sprintf への精度指定が正しく機能していない

Added by tadf (tadayoshi funaba) about 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.0dev (2013-09-16 trunk 42949) [i686-linux]
[ruby-dev:47714]

Description

rb_sprintf への精度指定が正しく機能していない。

rb_sprintf("%.04d", -2) /* => "-002" */
format('%.4d', -2) #=> "-0002"

Associated revisions

Revision 7e1c65dc
Added by nobu (Nobuyoshi Nakada) over 2 years ago

vsnprintf.c: prefix with precision

  • vsnprintf.c (BSD_vfprintf): sign and hex-prefix should not be counted in precision. [ruby-dev:47714] [Bug #8916]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 58210
Added by nobu (Nobuyoshi Nakada) over 2 years ago

vsnprintf.c: prefix with precision

  • vsnprintf.c (BSD_vfprintf): sign and hex-prefix should not be counted in precision. [ruby-dev:47714] [Bug #8916]

Revision 58210
Added by nobu (Nobuyoshi Nakada) over 2 years ago

vsnprintf.c: prefix with precision

  • vsnprintf.c (BSD_vfprintf): sign and hex-prefix should not be counted in precision. [ruby-dev:47714] [Bug #8916]

Revision 58210
Added by nobu (Nobuyoshi Nakada) over 2 years ago

vsnprintf.c: prefix with precision

  • vsnprintf.c (BSD_vfprintf): sign and hex-prefix should not be counted in precision. [ruby-dev:47714] [Bug #8916]

Revision 896d9fb9
Added by usa (Usaku NAKAMURA) over 2 years ago

merge revision(s) 58210: [Backport #8916]

    vsnprintf.c: prefix with precision

    * vsnprintf.c (BSD_vfprintf): sign and hex-prefix should not be
      counted in precision.  [ruby-dev:47714] [Bug #8916]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 59233
Added by usa (Usaku NAKAMURA) over 2 years ago

merge revision(s) 58210: [Backport #8916]

vsnprintf.c: prefix with precision

* vsnprintf.c (BSD_vfprintf): sign and hex-prefix should not be
  counted in precision.  [ruby-dev:47714] [Bug #8916]

Revision f5b84007
Added by nagachika (Tomoyuki Chikanaga) over 2 years ago

merge revision(s) 58210: [Backport #8916]

    vsnprintf.c: prefix with precision

    * vsnprintf.c (BSD_vfprintf): sign and hex-prefix should not be
      counted in precision.  [ruby-dev:47714] [Bug #8916]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 59299
Added by nagachika (Tomoyuki Chikanaga) over 2 years ago

merge revision(s) 58210: [Backport #8916]

vsnprintf.c: prefix with precision

* vsnprintf.c (BSD_vfprintf): sign and hex-prefix should not be
  counted in precision.  [ruby-dev:47714] [Bug #8916]

History

#1

Updated by nobu (Nobuyoshi Nakada) over 2 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r58210.


vsnprintf.c: prefix with precision

  • vsnprintf.c (BSD_vfprintf): sign and hex-prefix should not be counted in precision. [ruby-dev:47714] [Bug #8916]
#2

Updated by shyouhei (Shyouhei Urabe) over 2 years ago

  • Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN to 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED
#3

Updated by nobu (Nobuyoshi Nakada) over 2 years ago

  • Description updated (diff)

Updated by usa (Usaku NAKAMURA) over 2 years ago

  • Backport changed from 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED to 2.2: REQUIRED, 2.3: DONE, 2.4: REQUIRED

ruby_2_3 r59233 merged revision(s) 58210.

Updated by nagachika (Tomoyuki Chikanaga) over 2 years ago

  • Backport changed from 2.2: REQUIRED, 2.3: DONE, 2.4: REQUIRED to 2.2: REQUIRED, 2.3: DONE, 2.4: DONE

ruby_2_4 r59299 merged revision(s) 58210.

Also available in: Atom PDF