summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-19 20:45:24 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-19 20:45:24 +0000
commitc37140b3519fd8028d3b720bbb76c14af2c4e093 (patch)
tree1e6922b2ebd059a5c3e2db05d95d0263e4e29b2d /sample
parent63406c49712703ca63d610e75bba4ed0078c0f16 (diff)
Be consistent on the use of the implicit $_.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-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