1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
knu 2008-11-27 02:26:03 +00:00
parent ece7e2a595
commit d6a38b6824
3 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Thu Nov 27 11:25:04 2008 Akinori MUSHA <knu@iDaemons.org>
* 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@mbf.nifty.com>
* ext/gdbm/gdbm.c: do not set members of RSTRING(str) directly.

5
NEWS
View file

@ -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

View file

@ -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");