about summary refs log tree commit homepage
path: root/lib/dtas/fadefx.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-03-02 04:08:23 +0000
committerEric Wong <e@80x24.org>2017-03-02 04:08:43 +0000
commitf4c2ac4825f99ec4af529d65ae98abfaf034fb0f (patch)
treebbae58219dc4d158c033b892e0a7da67a969ecdc /lib/dtas/fadefx.rb
parentc2e04a5715d4cfa2b42fa09ba1f641d3ce741685 (diff)
downloaddtas-f4c2ac4825f99ec4af529d65ae98abfaf034fb0f.tar.gz
This is faster than relying on eval() for older Rubies.
https://bugs.ruby-lang.org/issues/13077
Ruby 2.5 is targetted for release in December 2017.
Diffstat (limited to 'lib/dtas/fadefx.rb')
-rw-r--r--lib/dtas/fadefx.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dtas/fadefx.rb b/lib/dtas/fadefx.rb
index aca6c68..1a00653 100644
--- a/lib/dtas/fadefx.rb
+++ b/lib/dtas/fadefx.rb
@@ -95,7 +95,7 @@ class DTAS::FadeFX # :nodoc:
   def parse!(str)
     return nil if str.empty?
     type = "t"
-    str.sub!(/\A([a-z])/, "") and type = $1.freeze
+    str.sub!(/\A([a-z])/, "") and type = DTAS.dedupe_str($1)
     F.new(type, parse_time(str))
   end
 end