From 51e991f0b21a1c271a7ab14721bd547ec5279348 Mon Sep 17 00:00:00 2001
From: Akira Matsuda <ronnie@dio.jp>
Date: Sat, 5 Nov 2016 15:35:11 +0900
Subject: Less method invocation

---
 activesupport/lib/active_support/duration/iso8601_serializer.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'activesupport')

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
 
-- 
cgit v1.2.3