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 | f9f54fb5eb778093f6c0d4f8db83f467261ec5ec (patch) | |
tree | e319288ea755911343de7202ce2fd2c5e77a1312 | |
parent | e9e2d5fffff9547e4d33538bf48ab574624c591d (diff) |
* 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
-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) <[email protected]> + + * sample/occur2.rb: have been broken. fixed for Ruby 1.9 feature. + Thu Dec 24 16:32:30 2009 Marc-Andre Lafortune <[email protected]> * lib/uri/generic.rb (eql?): Check the class of the compared object. 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 |