diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-27 02:26:03 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-27 02:26:03 +0000 |
commit | d6a38b6824c3766a63c865630cdcbbd67d49729a (patch) | |
tree | 2f6996c233f1549355656dfdf2fd67116f7a22d3 | |
parent | ece7e2a595a54345f31a630aefd42f1e8093ceaa (diff) |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | range.c | 1 |
3 files changed, 12 insertions, 0 deletions
@@ -1,3 +1,9 @@ +Thu Nov 27 11:25:04 2008 Akinori MUSHA <[email protected]> + + * 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 <[email protected]> * ext/gdbm/gdbm.c: do not set members of RSTRING(str) directly. @@ -38,6 +38,11 @@ with all sufficient information, see the ChangeLog file. 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 @@ -695,6 +695,7 @@ Init_Range() 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"); |