From e9bf3bce08d07f678f9fce7f276fe039f77db429 Mon Sep 17 00:00:00 2001 From: naruse Date: Sun, 16 Aug 2009 12:32:35 +0000 Subject: * lib/date/format.rb: suppressed a warning. * lib/irb/ruby-lex.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/date/format.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/date') diff --git a/lib/date/format.rb b/lib/date/format.rb index a83b29802..d6e3a3b85 100644 --- a/lib/date/format.rb +++ b/lib/date/format.rb @@ -544,8 +544,8 @@ class Date e._cent ||= if val >= 69 then 19 else 20 end when 'Z', /\A:{0,3}z/ return unless str.sub!(/\A((?:gmt|utc?)?[-+]\d+(?:[,.:]\d+(?::\d+)?)? - |[[:alpha:].\s]+(?:standard|daylight)\s+time\b - |[[:alpha:]]+(?:\s+dst)?\b + |[a-z.\s]+(?:standard|daylight)\s+time\b + |[a-z]+(?:\s+dst)?\b )/ix, '') val = $1 e.zone = val @@ -560,8 +560,8 @@ class Date end else case c - when /\A[\s\v]/ - str.sub!(/\A[\s\v]+/, '') + when /\A\s/ + str.sub!(/\A\s+/, '') else return unless str.sub!(Regexp.new('\\A' + Regexp.quote(a)), '') end @@ -703,9 +703,9 @@ class Date ( (?:gmt|utc?)?[-+]\d+(?:[,.:]\d+(?::\d+)?)? | - [[:alpha:].\s]+(?:standard|daylight)\stime\b + [a-z.\s]+(?:standard|daylight)\stime\b | - [[:alpha:]]+(?:\sdst)?\b + [a-z]+(?:\sdst)?\b ) )? /ix, @@ -1034,7 +1034,7 @@ class Date e._comp = comp - str.gsub!(/[^-+',.\/:@[:alnum:]\[\]]+/, ' ') + str.gsub!(/[^-+',.\/:@0-9a-zA-Z\[\]]+/, ' ') _parse_time(str, e) # || _parse_beat(str, e) _parse_day(str, e) -- cgit