From: nobu@... Date: 2006-08-01T23:50:13+09:00 Subject: Re: Multi-Line Date Formate Patch Hi, At Tue, 1 Aug 2006 23:22:37 +0900, James Edward Gray II wrote in [ruby-core:08474]: > > Below is my one character patch to resolve this issue. > > Uh, hello? Is there any good reason not to apply this patch? It seems insufficient. Index: lib/date/format.rb =================================================================== RCS file: /cvs/ruby/src/ruby/lib/date/format.rb,v retrieving revision 1.12 diff -p -U 2 -r1.12 format.rb --- lib/date/format.rb 6 Feb 2005 05:05:18 -0000 1.12 +++ lib/date/format.rb 1 Aug 2006 14:48:30 -0000 @@ -52,6 +52,6 @@ class Date def self.__strptime(str, fmt, elem) - fmt.scan(/%[EO]?.|./o) do |c| - cc = c.sub(/\A%[EO]?(.)\Z/o, '%\\1') + fmt.scan(/%[EO]?.|./m) do |c| + cc = c.sub(/\A%[EO]?(.)\Z/m, '%\\1') case cc when /\A\s/o @@ -491,6 +491,6 @@ class Date def strftime(fmt='%F') o = '' - fmt.scan(/%[EO]?.|./o) do |c| - cc = c.sub(/^%[EO]?(.)$/o, '%\\1') + fmt.scan(/%[EO]?.|./m) do |c| + cc = c.sub(/^%[EO]?(.)$/m, '%\\1') case cc when '%A'; o << DAYNAMES[wday] -- Nobu Nakada