about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-01-20 19:28:22 +0000
committerEric Wong <e@80x24.org>2022-01-21 20:29:57 +0000
commit7243de1955b30b2b83fb0242d2dc5112f2c8055d (patch)
tree961d461ab54bcb43408efe9cca72a7a1a649bb41
parentbf9787ac517fe19af5fd6ba918a66b220fcbc923 (diff)
downloaddtas-7243de1955b30b2b83fb0242d2dc5112f2c8055d.tar.gz
"omap" is specific to Ruby and makes interopability with other
languages more difficult.

While it's true environment variables are stored as an ordered
array of C strings (see environ(7)); order doesn't matter in
practice.  Everyone in the real world treats the environment as
an unordered key-value store.

Followup-to: cac63517e7f751cc (doc: drop ordered map from examples, 2022-01-07)
-rw-r--r--lib/dtas/player.rb7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb
index 243f0b0..3db15c3 100644
--- a/lib/dtas/player.rb
+++ b/lib/dtas/player.rb
@@ -1,7 +1,6 @@
 # Copyright (C) all contributors <dtas-all@nongnu.org>
 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 # frozen_string_literal: true
-require 'yaml'
 require 'shellwords'
 require_relative '../dtas'
 require_relative 'xs'
@@ -123,10 +122,6 @@ class DTAS::Player # :nodoc:
     rv
   end
 
-  def to_omap(hash)
-    YAML::Omap === hash ? hash : YAML::Omap.new.merge!(hash)
-  end
-
   def self.load(hash)
     rv = new
     rv.instance_eval do
@@ -157,7 +152,6 @@ class DTAS::Player # :nodoc:
         @source_map.each do |name, src|
           src_hsh = v[name] or next
           src.load!(src_hsh)
-          src.env = to_omap(src.env)
         end
         source_map_reload
       end
@@ -170,7 +164,6 @@ class DTAS::Player # :nodoc:
         sinks.each do |sink_hsh|
           sink_hsh['name'] = -sink_hsh['name']
           sink = DTAS::Sink.load(sink_hsh)
-          sink.env = to_omap(sink.env)
           @sinks[sink.name] = sink
         end
       end