diff options
| author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-12-19 20:45:24 +0000 |
|---|---|---|
| committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-12-19 20:45:24 +0000 |
| commit | 2c917203b7a4a53cb9685ba387ab9231261e5098 (patch) | |
| tree | 1e6922b2ebd059a5c3e2db05d95d0263e4e29b2d /sample | |
| parent | 99b1964956339d6968377cd0e1f2f5999a88e7fe (diff) | |
| download | ruby-2c917203b7a4a53cb9685ba387ab9231261e5098.tar.gz ruby-2c917203b7a4a53cb9685ba387ab9231261e5098.tar.xz ruby-2c917203b7a4a53cb9685ba387ab9231261e5098.zip | |
Be consistent on the use of the implicit $_.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
| -rw-r--r-- | sample/occur.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sample/occur.rb b/sample/occur.rb index f489beee1..8bb09e15a 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 |
