aboutsummaryrefslogtreecommitdiffstats
path: root/enumerator.c
diff options
context:
space:
mode:
Diffstat (limited to 'enumerator.c')
-rw-r--r--enumerator.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/enumerator.c b/enumerator.c
index 9a00d95dcc..f4ccda0121 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -103,7 +103,8 @@
*/
VALUE rb_cEnumerator;
VALUE rb_cLazy;
-static ID id_rewind, id_each, id_new, id_initialize, id_yield, id_call, id_next, id_result, id_lazy;
+static ID id_rewind, id_each, id_new, id_initialize, id_yield, id_call;
+static ID id_eqq, id_next, id_result, id_lazy;
static VALUE sym_each;
VALUE rb_eStopIteration;
@@ -1377,7 +1378,7 @@ static VALUE
lazy_grep_func(VALUE val, VALUE m, int argc, VALUE *argv)
{
VALUE element = argv[1];
- VALUE result = rb_funcall(m, rb_intern("=~"), 1, element);
+ VALUE result = rb_funcall(m, id_eqq, 1, element);
if (RTEST(result)) {
return rb_funcall(argv[0], id_yield, 1, element);
@@ -1530,6 +1531,7 @@ Init_Enumerator(void)
id_next = rb_intern("next");
id_result = rb_intern("result");
id_lazy = rb_intern("lazy");
+ id_eqq = rb_intern("===");
sym_each = ID2SYM(id_each);
InitVM(Enumerator);