From 1eb248f6cff5290de7c5abff5d42288615e37d2a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 2 Jan 2017 00:03:25 +0000 Subject: source/sox: simplify conditional, slightly One normal method dispatch is probably preferable to two optimized instructions + immediate. --- lib/dtas/source/sox.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/dtas') diff --git a/lib/dtas/source/sox.rb b/lib/dtas/source/sox.rb index e436fb1..9f3cd9b 100644 --- a/lib/dtas/source/sox.rb +++ b/lib/dtas/source/sox.rb @@ -60,7 +60,7 @@ class DTAS::Source::Sox # :nodoc: key = $1.upcase key = eval "#{key.inspect}.freeze" end - (comments[key] ||= ''.b) << "#{line}\n" if line.size > 0 + (comments[key] ||= ''.b) << "#{line}\n" unless line.empty? end comments.each do |k,v| v.chomp! -- cgit v1.2.3-24-ge0c7