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

ruby-changes:56747

From: Nobuyoshi <ko1@a...>
Date: Thu, 1 Aug 2019 16:44:05 +0900 (JST)
Subject: [ruby-changes:56747] Nobuyoshi Nakada: 1549fbfda5 (master): Use predefined idTo_proc

https://git.ruby-lang.org/ruby.git/commit/?id=1549fbfda5

From 1549fbfda561759879f16e5d7b2451fe9ac03147 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 1 Aug 2019 16:40:03 +0900
Subject: Use predefined idTo_proc


diff --git a/enumerator.c b/enumerator.c
index 8cb280b..11c863a 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -110,7 +110,7 @@ VALUE rb_cEnumerator; https://github.com/ruby/ruby/blob/trunk/enumerator.c#L110
 static VALUE rb_cLazy;
 static ID id_rewind, id_new, id_to_enum;
 static ID id_next, id_result, id_receiver, id_arguments, id_memo, id_method, id_force;
-static ID id_begin, id_end, id_step, id_exclude_end, id_to_proc;
+static ID id_begin, id_end, id_step, id_exclude_end;
 static VALUE sym_each, sym_cycle, sym_yield;
 
 #define id_call idCall
@@ -1305,7 +1305,7 @@ yielder_to_proc(VALUE obj) https://github.com/ruby/ruby/blob/trunk/enumerator.c#L1305
 {
     VALUE method = rb_obj_method(obj, sym_yield);
 
-    return rb_funcall(method, id_to_proc, 0);
+    return rb_funcall(method, idTo_proc, 0);
 }
 
 static VALUE
@@ -3683,7 +3683,6 @@ Init_Enumerator(void) https://github.com/ruby/ruby/blob/trunk/enumerator.c#L3683
     id_end = rb_intern("end");
     id_step = rb_intern("step");
     id_exclude_end = rb_intern("exclude_end");
-    id_to_proc = rb_intern("to_proc");
     sym_each = ID2SYM(id_each);
     sym_cycle = ID2SYM(rb_intern("cycle"));
     sym_yield = ID2SYM(rb_intern("yield"));
-- 
cgit v0.10.2


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

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