diff options
author | Eric Wong <e@80x24.org> | 2017-03-02 04:08:23 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-03-02 04:08:43 +0000 |
commit | f4c2ac4825f99ec4af529d65ae98abfaf034fb0f (patch) | |
tree | bbae58219dc4d158c033b892e0a7da67a969ecdc /lib/dtas/rg_state.rb | |
parent | c2e04a5715d4cfa2b42fa09ba1f641d3ce741685 (diff) | |
download | dtas-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/rg_state.rb')
-rw-r--r-- | lib/dtas/rg_state.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dtas/rg_state.rb b/lib/dtas/rg_state.rb index 7af67e1..6b2c718 100644 --- a/lib/dtas/rg_state.rb +++ b/lib/dtas/rg_state.rb @@ -72,7 +72,7 @@ class DTAS::RGState # :nodoc: when 1 then return 'gain 192' else val.abs <= 0.00000001 and return - sprintf('gain %0.8f', val).freeze + DTAS.dedupe_str(sprintf('gain %0.8f', val)) end end |