summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-16 13:20:50 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-16 13:20:50 +0000
commitaa3c6d4dd28366b3d51f3a126267f58387f6dbe7 (patch)
treeb4acc60d07f7f99001c94a763b9709e2e2635d6e /lib
parent5e4f23d600435fa5373cb40ff3c736c008caef52 (diff)
* lib/date/format.rb: reverted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/date/format.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/date/format.rb b/lib/date/format.rb
index d6e3a3b853..a83b29802e 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+)?)?
- |[a-z.\s]+(?:standard|daylight)\s+time\b
- |[a-z]+(?:\s+dst)?\b
+ |[[:alpha:].\s]+(?:standard|daylight)\s+time\b
+ |[[:alpha:]]+(?:\s+dst)?\b
)/ix, '')
val = $1
e.zone = val
@@ -560,8 +560,8 @@ class Date
end
else
case c
- when /\A\s/
- str.sub!(/\A\s+/, '')
+ when /\A[\s\v]/
+ str.sub!(/\A[\s\v]+/, '')
else
return unless str.sub!(Regexp.new('\\A' + Regexp.quote(a)), '')
end
@@ -703,9 +703,9 @@ class Date
(
(?:gmt|utc?)?[-+]\d+(?:[,.:]\d+(?::\d+)?)?
|
- [a-z.\s]+(?:standard|daylight)\stime\b
+ [[:alpha:].\s]+(?:standard|daylight)\stime\b
|
- [a-z]+(?:\sdst)?\b
+ [[:alpha:]]+(?:\sdst)?\b
)
)?
/ix,
@@ -1034,7 +1034,7 @@ class Date
e._comp = comp
- str.gsub!(/[^-+',.\/:@0-9a-zA-Z\[\]]+/, ' ')
+ str.gsub!(/[^-+',.\/:@[:alnum:]\[\]]+/, ' ')
_parse_time(str, e) # || _parse_beat(str, e)
_parse_day(str, e)