From f9f54fb5eb778093f6c0d4f8db83f467261ec5ec Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 27 Dec 2009 00:14:41 +0000 Subject: [PATCH] * 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 --- ChangeLog | 4 ++++ sample/occur2.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d02d38564f..6d4770b33b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Dec 27 09:13:55 2009 Yuki Sonoda (Yugui) + + * sample/occur2.rb: have been broken. fixed for Ruby 1.9 feature. + Thu Dec 24 16:32:30 2009 Marc-Andre Lafortune * 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