diff options
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 82cccf43b9..7b6d5cc671 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 0c74b49750..a91c1e38c3 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 7bf1affb42..35fffcfe98 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 |