]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/plot_distribution
refactoring of ruby code s/has_key?/[]/
[biopieces.git] / bp_bin / plot_distribution
index 02f802ee611ea1146c88a7de878705358f982f10..175ca595377d4e3824d2c51620af5654e2114fd3 100755 (executable)
@@ -54,7 +54,7 @@ count_hash = Hash.new(0)
 
 Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
   input.each_record do |record|
-    if record.has_key? key
+    if record[key]
       count_hash[record[key].to_i] += 1
     end