diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-27 00:14:41 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-27 00:14:41 +0000 |
commit | aeac63ed3403e6af9116107b3cc42b6833ef52ed (patch) | |
tree | e319288ea755911343de7202ce2fd2c5e77a1312 | |
parent | 408c42d28a28c705fbc140f6aca3bfb4cdd05bab (diff) | |
download | ruby-aeac63ed3403e6af9116107b3cc42b6833ef52ed.tar.gz ruby-aeac63ed3403e6af9116107b3cc42b6833ef52ed.tar.xz ruby-aeac63ed3403e6af9116107b3cc42b6833ef52ed.zip |
* sample/occur2.rb: have been broken. fixed for Ruby 1.9 feature.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | sample/occur2.rb | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Sun Dec 27 09:13:55 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp> + + * sample/occur2.rb: have been broken. fixed for Ruby 1.9 feature. + Thu Dec 24 16:32:30 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca> * lib/uri/generic.rb (eql?): Check the class of the compared object. diff --git a/sample/occur2.rb b/sample/occur2.rb index 53885c0ba..22cf52003 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 |