[前][次][番号順一覧][スレッド一覧]

ruby-changes:7571

From: kazu <ko1@a...>
Date: Wed, 3 Sep 2008 21:21:47 +0900 (JST)
Subject: [ruby-changes:7571] Ruby:r19092 (trunk): * golf_prelude.rb: suppress warning when goruby -v.

kazu	2008-09-03 21:21:32 +0900 (Wed, 03 Sep 2008)

  New Revision: 19092

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19092

  Log:
    * golf_prelude.rb: suppress warning when goruby -v.

  Modified files:
    trunk/ChangeLog
    trunk/golf_prelude.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19091)
+++ ChangeLog	(revision 19092)
@@ -1,3 +1,7 @@
+Wed Sep  3 21:19:51 2008  Kazuhiro NISHIYAMA  <zn@m...>
+
+	* golf_prelude.rb: suppress warning when goruby -v.
+
 Wed Sep  3 21:07:30 2008  Tanaka Akira  <akr@f...>
 
 	* transcode.c (BL_MIN_BYTE): defined.
Index: golf_prelude.rb
===================================================================
--- golf_prelude.rb	(revision 19091)
+++ golf_prelude.rb	(revision 19092)
@@ -78,7 +78,8 @@
   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 @@
 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"
   }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]