summaryrefslogtreecommitdiff
path: root/ext/psych/lib
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-05 18:14:37 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-05 18:14:37 +0000
commitf32ae44629199af0462be3ac15359a9ad7c56999 (patch)
tree60d059f1ab67275619cf7d3650e0497613639eb2 /ext/psych/lib
parent68ab3ede30d3e644c220a6fe3b0732b2442bcc6c (diff)
* ext/psych/lib/psych/scalar_scanner.rb: making the code more beautiful.
Thanks nobu! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych/lib')
-rw-r--r--ext/psych/lib/psych/scalar_scanner.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/psych/lib/psych/scalar_scanner.rb b/ext/psych/lib/psych/scalar_scanner.rb
index e2aef65bda..dc6f9944fa 100644
--- a/ext/psych/lib/psych/scalar_scanner.rb
+++ b/ext/psych/lib/psych/scalar_scanner.rb
@@ -90,7 +90,7 @@ module Psych
return time if 'Z' == md[3]
return Time.at(time.to_i, us) unless md[3]
- tz = md[3].split(':').map { |digit| Integer(digit.sub(/([-+])0/, '\1')) }
+ tz = md[3].split(':').map { |digit| Integer(digit, 10) }
offset = tz.first * 3600 + ((tz[1] || 0) * 60)
Time.at((time - offset).to_i, us)
end