lib/commands/unipept/taxa2tree.rb in unipept-2.2.1 vs lib/commands/unipept/taxa2tree.rb in unipept-2.2.2

- old
+ new

@@ -32,11 +32,11 @@ @stdin_contents.length end def input_iterator return arguments.each unless arguments.empty? - return IO.foreach(options[:input]) if options[:input] + return File.foreach(options[:input]) if options[:input] @stdin_contents.each end protected @@ -55,10 +55,10 @@ data = input.map do |item| splitted = item.rstrip.split ',' splitted[1] = splitted[1].to_i splitted end - data = Hash[data] + data = data.to_h else data = Hash.new 0 input.each do |i| data[i.rstrip] += 1 end