path: root/range.c
diff options
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-23 11:16:09 (GMT)
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-23 11:16:09 (GMT)
commit62b750bb55916e526fb53cb4c19da777872c27f6 (patch)
tree7e49160cfe595f152b552f7420a8f31d3ed4161b /range.c
parent387e838c024cbe59c5df297d8ad36012406e38d1 (diff)
* range.c (range_eqq): revert r11113 because rb_call_super() is
called in range_include() and thus r11113 doesn't work when the receiver Range object consists of non linear objects such as Date objects. [ruby-core:72908] [Bug #12003] git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'range.c')
1 files changed, 1 insertions, 7 deletions
diff --git a/range.c b/range.c
index 95b1b92..ab3f1af 100644
--- a/range.c
+++ b/range.c
@@ -23,7 +23,6 @@ static ID id_beg, id_end, id_excl, id_integer_p, id_div;
#define id_succ idSucc
static VALUE r_cover_p(VALUE, VALUE, VALUE, VALUE);
-static VALUE range_include(VALUE range, VALUE val);
#define RANGE_BEG(r) (RSTRUCT(r)->as.ary[0])
#define RANGE_END(r) (RSTRUCT(r)->as.ary[1])
@@ -1135,12 +1134,7 @@ range_inspect(VALUE range)
static VALUE
range_eqq(VALUE range, VALUE val)
- ID pred;
- CONST_ID(pred, "include?");
- if (rb_method_basic_definition_p(RBASIC_CLASS(range), pred)) {
- return range_include(range, val);
- }
- return rb_funcall(range, pred, 1, val);
+ return rb_funcall(range, rb_intern("include?"), 1, val);