summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-27 00:14:41 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-27 00:14:41 +0000
commitf9f54fb5eb778093f6c0d4f8db83f467261ec5ec (patch)
treee319288ea755911343de7202ce2fd2c5e77a1312 /sample
parente9e2d5fffff9547e4d33538bf48ab574624c591d (diff)
downloadruby-f9f54fb5eb778093f6c0d4f8db83f467261ec5ec.tar.gz
* sample/occur2.rb: have been broken. fixed for Ruby 1.9 feature.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/occur2.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/sample/occur2.rb b/sample/occur2.rb
index 53885c0ba7..22cf52003a 100644
--- a/sample/occur2.rb
+++ b/sample/occur2.rb
@@ -2,7 +2,7 @@
# usege: ruby occur2.rb file..
freq = {}
while gets()
- for word in split(/\W+/)
+ for word in $_.split(/\W+/)
begin
freq[word] += 1
rescue NameError