diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-09-21 13:26:15 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-09-21 13:26:15 -0300 |
commit | 114e1802132c944263a44af5f81da6d43c78124b (patch) | |
tree | 84362e42935da24c0f20f1cc422d9a69812b7824 | |
parent | 7b545ff911a3f9bd3c9b179a2c6ac6b70bab3ee0 (diff) | |
download | rails-114e1802132c944263a44af5f81da6d43c78124b.tar.gz rails-114e1802132c944263a44af5f81da6d43c78124b.tar.bz2 rails-114e1802132c944263a44af5f81da6d43c78124b.zip |
Fix invalid ruby 1.8 syntax
-rw-r--r-- | activesupport/lib/active_support/time_with_zone.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index 59da6bc760..a3c378f057 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -177,10 +177,11 @@ module ActiveSupport # Replaces <tt>%Z</tt> and <tt>%z</tt> directives with +zone+ and +formatted_offset+, respectively, before passing to # Time#strftime, so that zone information is correct def strftime(format) - format = format.gsub('%Z', zone) - .gsub('%z', formatted_offset(false)) - .gsub('%:z', formatted_offset(true)) - .gsub('%::z', formatted_offset(true) + ":00") + format = format.gsub('%Z', zone). + gsub('%z', formatted_offset(false)). + gsub('%:z', formatted_offset(true)). + gsub('%::z', formatted_offset(true) + ":00") + time.strftime(format) end |