diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-01 03:12:21 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-01 03:12:21 +0000 |
commit | b77b7c30d4855734384a095db41a734d315bb8fa (patch) | |
tree | ae6cd78921bf626d54145b5485474bf59c3dceb4 /lib | |
parent | ff338e4e581cc264abf4c5bfd3501bb77c16335f (diff) | |
download | ruby-b77b7c30d4855734384a095db41a734d315bb8fa.tar.gz ruby-b77b7c30d4855734384a095db41a734d315bb8fa.tar.xz ruby-b77b7c30d4855734384a095db41a734d315bb8fa.zip |
2000-02-01
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/getoptlong.rb | 2 | ||||
-rw-r--r-- | lib/observer.rb | 2 | ||||
-rw-r--r-- | lib/parsedate.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/getoptlong.rb b/lib/getoptlong.rb index 82cccf43b..7b6d5cc67 100644 --- a/lib/getoptlong.rb +++ b/lib/getoptlong.rb @@ -35,7 +35,7 @@ class GetoptLong # # Status codes. # - STATUS_YET, STATUS_STARTED, STATUS_TERMINATED = 0..2 + STATUS_YET, STATUS_STARTED, STATUS_TERMINATED = 0, 1, 2 # # Error types. diff --git a/lib/observer.rb b/lib/observer.rb index 0c74b4975..a91c1e38c 100644 --- a/lib/observer.rb +++ b/lib/observer.rb @@ -32,7 +32,7 @@ module Observable def notify_observers(*arg) if @observer_state if @observer_peers - for i in @observer_peers + for i in @observer_peers.dup i.update(*arg) end end diff --git a/lib/parsedate.rb b/lib/parsedate.rb index 7bf1affb4..35fffcfe9 100644 --- a/lib/parsedate.rb +++ b/lib/parsedate.rb @@ -27,7 +27,7 @@ module ParseDate if date.sub!(/(#{DAYPAT})[a-z]*,?/i, ' ') wday = DAYS[$1.downcase] end - if date.sub!(/(\d+):(\d+)(?::(\d+))?(?:\s*(am|pm))?(?:\s+([a-z]{1,4}(?:\s+[a-z]{1,4}|[-+]\d{4})?))?/i, ' ') + if date.sub!(/(\d+):(\d+)(?::(\d+))?(?:\s*(am|pm))?(?:\s+([a-z]{1,4}(?:\s+[a-z]{1,4}|[-+]\d{4})?|[-+]\d{4}))?/i, ' ') hour = $1.to_i min = $2.to_i if $3 |