about summary refs log tree commit homepage
path: root/lib/dtas/source
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-01-24 09:41:09 +0000
committerEric Wong <e@80x24.org>2016-01-24 09:41:09 +0000
commitfc8e446d5da1887044c86ed07e8cf2eee6cf2cfd (patch)
tree9b94f8503954b6534a77c30c6885257e6cb372a3 /lib/dtas/source
parent3a76adf065889787a300f5001126f3ca83731e27 (diff)
downloaddtas-fc8e446d5da1887044c86ed07e8cf2eee6cf2cfd.tar.gz
This reduces memory usage as a Regexp object is hundreds
of bytes and a single-byte string object is only 40 bytes
that is deduped within the VM.
Diffstat (limited to 'lib/dtas/source')
-rw-r--r--lib/dtas/source/mp3gain.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dtas/source/mp3gain.rb b/lib/dtas/source/mp3gain.rb
index e33b48a..47b24c6 100644
--- a/lib/dtas/source/mp3gain.rb
+++ b/lib/dtas/source/mp3gain.rb
@@ -16,7 +16,7 @@ module DTAS::Source::Mp3gain # :nodoc:
     case @infile
     when String
       @infile =~ /\.mp[g23]\z/in or return
-      qx(%W(mp3gain -s c #@infile)).split(/\n/).each do |line|
+      qx(%W(mp3gain -s c #@infile)).split("\n").each do |line|
         case line
         when /^Recommended "(Track|Album)" dB change:\s*(\S+)/
           tmp["REPLAYGAIN_#{$1.upcase}_GAIN"] = $2