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

ruby-changes:8834

From: knu <ko1@a...>
Date: Thu, 27 Nov 2008 11:26:14 +0900 (JST)
Subject: [ruby-changes:8834] Ruby:r20370 (ruby_1_8): * range.c: Add Range#cover? as a new alias to #include? for the

knu	2008-11-27 11:26:03 +0900 (Thu, 27 Nov 2008)

  New Revision: 20370

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

  Log:
    * range.c: Add Range#cover? as a new alias to #include? for the
      forward compatibility with 1.9, in which the behavior of
      Range#include? has changed.

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/NEWS
    branches/ruby_1_8/range.c

Index: ruby_1_8/NEWS
===================================================================
--- ruby_1_8/NEWS	(revision 20369)
+++ ruby_1_8/NEWS	(revision 20370)
@@ -38,6 +38,11 @@
 
     Renamed from ENV.index.
 
+  * Range#cover?
+
+    New alias to #include? for the forward compatibility with 1.9, in
+    which the behavior of Range#include? has changed.
+
 * dbm
 
   DBM#key
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 20369)
+++ ruby_1_8/ChangeLog	(revision 20370)
@@ -1,3 +1,9 @@
+Thu Nov 27 11:25:04 2008  Akinori MUSHA  <knu@i...>
+
+	* range.c: Add Range#cover? as a new alias to #include? for the
+	  forward compatibility with 1.9, in which the behavior of
+	  Range#include? has changed.
+
 Wed Nov 26 13:31:07 2008  Kazuhiro NISHIYAMA  <zn@m...>
 
 	* ext/gdbm/gdbm.c: do not set members of RSTRING(str) directly.
Index: ruby_1_8/range.c
===================================================================
--- ruby_1_8/range.c	(revision 20369)
+++ ruby_1_8/range.c	(revision 20370)
@@ -695,6 +695,7 @@
 
     rb_define_method(rb_cRange, "member?", range_include, 1);
     rb_define_method(rb_cRange, "include?", range_include, 1);
+    rb_define_method(rb_cRange, "cover?", range_include, 1);
 
     id_cmp = rb_intern("<=>");
     id_succ = rb_intern("succ");

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

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