From f32ae44629199af0462be3ac15359a9ad7c56999 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Mon, 5 Jul 2010 18:14:37 +0000 Subject: * 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 --- ext/psych/lib/psych/scalar_scanner.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/psych/lib') 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 -- cgit v1.2.3