From 79e5bc63e1e71745da9cb9eb84470956d1a113dd Mon Sep 17 00:00:00 2001 From: Jeff Yates Date: Sat, 24 Oct 2020 15:10:42 -0400 Subject: [PATCH] changed word count hash/json from string to integer --- sorter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorter.rb b/sorter.rb index 51c627a..616f2b9 100755 --- a/sorter.rb +++ b/sorter.rb @@ -27,7 +27,7 @@ require 'optparse' def bin_counter (bin, text) ret = Hash.new bin.each do |word| - ret[word.to_sym] = text.scan(word).count.to_s + ret[word.to_sym] = text.scan(word).count.to_i end return ret end