diff options
author | Kenichi Kamiya <[email protected]> | 2019-08-19 18:43:23 +0900 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2019-08-19 18:43:23 +0900 |
commit | 8882986d9701ef8be4cdd87e64a30321f1738cee (patch) | |
tree | 67c0f54ef910e727c9226397d079579ad1addfb0 /sample/freq.rb | |
parent | 209ea85b54c9229f0c1e5c730dee05a096599eb0 (diff) |
Drop duplicated sample code (#2389) [ci skip]
* Drop duplicated sample code
* Drop another style sample
https://github.com/ruby/ruby/pull/2389#issuecomment-522489520
* Update sample list
Diffstat (limited to 'sample/freq.rb')
-rw-r--r-- | sample/freq.rb | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/sample/freq.rb b/sample/freq.rb deleted file mode 100644 index 1b2194c69a..0000000000 --- a/sample/freq.rb +++ /dev/null @@ -1,12 +0,0 @@ -# word occurrence listing -# usage: ruby freq.rb file.. -freq = Hash.new(0) -while line = gets() - line.scan(/\w+/) do |word| - freq[word] += 1 - end -end - -for word in freq.keys.sort! - print word, " -- ", freq[word], "\n" -end |