diff --git a/ChangeLog b/ChangeLog index 60ef5a4455..b0dd1b15e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Sep 3 21:19:51 2008 Kazuhiro NISHIYAMA + + * golf_prelude.rb: suppress warning when goruby -v. + Wed Sep 3 21:07:30 2008 Tanaka Akira * transcode.c (BL_MIN_BYTE): defined. diff --git a/golf_prelude.rb b/golf_prelude.rb index 15c1832a39..2548314532 100644 --- a/golf_prelude.rb +++ b/golf_prelude.rb @@ -78,7 +78,8 @@ class String end (Array.instance_methods-instance_methods-[:to_ary,:transpose,:flatten,:flatten!,:compact,:compact!,:assoc,:rassoc]).each{|meth| - eval"def #{meth}(*args, &block) + eval" + def #{meth}(*args, &block) a=to_a result = a.#{meth}(*args, &block) replace(a.join) @@ -96,7 +97,8 @@ end class Enumerator alias old_to_s to_s (Array.instance_methods-instance_methods-[:replace]+[:to_s]).each{|meth| - eval"def #{meth}(*args, &block) + eval" + def #{meth}(*args, &block) to_a.#{meth}(*args, &block) end" }