summaryrefslogtreecommitdiff
path: root/sample/occur2.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-10-02 07:48:42 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-10-02 07:48:42 +0000
commit9a46002fc01b1b874d768b2e8372b725a9e8b298 (patch)
tree9e3660449780967673d6a687f00329710e899537 /sample/occur2.rb
parent173e2f6636701f7657a0acb3dcba33e9d66b562d (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/occur2.rb')
-rw-r--r--sample/occur2.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/sample/occur2.rb b/sample/occur2.rb
index c450c30b0f..b8ecf70904 100644
--- a/sample/occur2.rb
+++ b/sample/occur2.rb
@@ -5,7 +5,7 @@ while gets()
for word in $_.split(/\W+/)
begin
freq[word] = freq[word] + 1
- rescue
+ rescue NameError
freq[word] = 1
end
end