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

ruby-changes:27907

From: knu <ko1@a...>
Date: Wed, 27 Mar 2013 11:11:20 +0900 (JST)
Subject: [ruby-changes:27907] knu:r39959 (ruby_1_8): * array.c (rb_ary_collect), enum.c (enum_collect): rb_warn() is a

knu	2013-03-27 11:10:29 +0900 (Wed, 27 Mar 2013)

  New Revision: 39959

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

  Log:
    * array.c (rb_ary_collect), enum.c (enum_collect): rb_warn() is a
      bit too noisy when RubyGems, so change it to rb_warning().

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/array.c
    branches/ruby_1_8/enum.c

Index: ruby_1_8/array.c
===================================================================
--- ruby_1_8/array.c	(revision 39958)
+++ ruby_1_8/array.c	(revision 39959)
@@ -1902,8 +1902,8 @@ rb_ary_collect(ary) https://github.com/ruby/ruby/blob/trunk/ruby_1_8/array.c#L1902
     VALUE collect;
 
     if (!rb_block_given_p()) {
-	rb_warn("Array#%s without a block does not return an array in 1.9 and later",
-		rb_id2name(rb_frame_last_func()));
+	rb_warning("Array#%s without a block does not return an array in 1.9 and later",
+		   rb_id2name(rb_frame_last_func()));
 	return rb_ary_new4(RARRAY(ary)->len, RARRAY(ary)->ptr);
     }
 
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 39958)
+++ ruby_1_8/ChangeLog	(revision 39959)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_8/ChangeLog#L1
+Wed Mar 27 11:09:17 2013  Akinori MUSHA  <knu@i...>
+
+	* array.c (rb_ary_collect), enum.c (enum_collect): rb_warn() is a
+	  bit too noisy when RubyGems, so change it to rb_warning().
+
 Sun Feb 24 02:03:14 2013  Tanaka Akira  <akr@f...>
 
 	* configure.in: Minix 3.2.1 supports shared libraries as NetBSD.
Index: ruby_1_8/enum.c
===================================================================
--- ruby_1_8/enum.c	(revision 39958)
+++ ruby_1_8/enum.c	(revision 39959)
@@ -431,8 +431,8 @@ enum_collect(obj) https://github.com/ruby/ruby/blob/trunk/ruby_1_8/enum.c#L431
     VALUE ary = rb_ary_new();
 
     if (!rb_block_given_p()) {
-	rb_warn("Enumerable#%s without a block does not return an array in 1.9 and later",
-		rb_id2name(rb_frame_last_func()));
+	rb_warning("Enumerable#%s without a block does not return an array in 1.9 and later",
+		   rb_id2name(rb_frame_last_func()));
 	rb_iterate(rb_each, obj, collect_all, ary);
     }
     else {

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

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