summaryrefslogtreecommitdiff
path: root/sample/occur.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/occur.rb')
-rw-r--r--sample/occur.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/sample/occur.rb b/sample/occur.rb
index f489bee..8bb09e1 100644
--- a/sample/occur.rb
+++ b/sample/occur.rb
@@ -2,7 +2,7 @@
# usege: ruby occur.rb file..
freq = Hash.new(0)
while gets()
- for word in $_.split(/\W+/)
+ for word in split(/\W+/)
freq[word] += 1
end
end