merges r20347 from trunk into ruby_1_9_1.

* lib/date/format.rb (strftime): ignores '_' flag for %[LN].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2008-11-30 09:22:38 +00:00
parent 2015069a20
commit 029392bc87
3 changed files with 24 additions and 0 deletions

View file

@ -255,6 +255,7 @@ class Date
when 'j'; emit_n(yday, 3, f)
when 'k'; emit_a(hour, 2, f)
when 'L'
f[:p] = nil
w = f[:w] || 3
u = 10**w
emit_n((sec_fraction * u).floor, w, f)
@ -262,6 +263,7 @@ class Date
when 'M', 'OM'; emit_n(min, 2, f)
when 'm', 'Om'; emit_n(mon, 2, f)
when 'N'
f[:p] = nil
w = f[:w] || 9
u = 10**w
emit_n((sec_fraction * u).floor, w, f)