diff options
author | Akira Matsuda <ronnie@dio.jp> | 2016-11-05 15:35:11 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2016-11-05 15:35:40 +0900 |
commit | 51e991f0b21a1c271a7ab14721bd547ec5279348 (patch) | |
tree | b14a5ff9da53f66ca5bfc8c1b405b2e759ff0b75 /activesupport/lib/active_support/duration | |
parent | a432e6dba44f1aba465d0fefcd65233cd6b8599e (diff) | |
download | rails-51e991f0b21a1c271a7ab14721bd547ec5279348.tar.gz rails-51e991f0b21a1c271a7ab14721bd547ec5279348.tar.bz2 rails-51e991f0b21a1c271a7ab14721bd547ec5279348.zip |
Less method invocation
Diffstat (limited to 'activesupport/lib/active_support/duration')
-rw-r--r-- | activesupport/lib/active_support/duration/iso8601_serializer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/duration/iso8601_serializer.rb b/activesupport/lib/active_support/duration/iso8601_serializer.rb index 39b1b40e72..51d53e2f8d 100644 --- a/activesupport/lib/active_support/duration/iso8601_serializer.rb +++ b/activesupport/lib/active_support/duration/iso8601_serializer.rb @@ -26,7 +26,7 @@ module ActiveSupport if parts.key?(:seconds) time << "#{sprintf(@precision ? "%0.0#{@precision}f" : '%g', parts[:seconds])}S" end - output << "T#{time}" if time.present? + output << "T#{time}" unless time.empty? "#{sign}#{output}" end |