ruby-changes:47458
From: nobu <ko1@a...>
Date: Fri, 11 Aug 2017 11:44:40 +0900 (JST)
Subject: [ruby-changes:47458] nobu:r59575 (trunk): enum.c: make constant argument static
nobu 2017-08-11 11:44:30 +0900 (Fri, 11 Aug 2017) New Revision: 59575 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59575 Log: enum.c: make constant argument static Modified files: trunk/common.mk trunk/enum.c Index: enum.c =================================================================== --- enum.c (revision 59574) +++ enum.c (revision 59575) @@ -12,6 +12,7 @@ https://github.com/ruby/ruby/blob/trunk/enum.c#L12 #include "internal.h" #include "ruby/util.h" #include "id.h" +#include "symbol.h" #include <assert.h> @@ -2644,7 +2645,7 @@ enum_zip(int argc, VALUE *argv, VALUE ob https://github.com/ruby/ruby/blob/trunk/enum.c#L2645 argv[i] = ary; } if (!allary) { - const VALUE sym_each = ID2SYM(id_each); + static const VALUE sym_each = STATIC_ID2SYM(id_each); CONST_ID(conv, "to_enum"); for (i=0; i<argc; i++) { if (!rb_respond_to(argv[i], id_each)) { Index: common.mk =================================================================== --- common.mk (revision 59574) +++ common.mk (revision 59575) @@ -1637,6 +1637,7 @@ enum.$(OBJEXT): {$(VPATH)}onigmo.h https://github.com/ruby/ruby/blob/trunk/common.mk#L1637 enum.$(OBJEXT): {$(VPATH)}oniguruma.h enum.$(OBJEXT): {$(VPATH)}st.h enum.$(OBJEXT): {$(VPATH)}subst.h +enum.$(OBJEXT): {$(VPATH)}symbol.h enum.$(OBJEXT): {$(VPATH)}util.h enumerator.$(OBJEXT): $(hdrdir)/ruby/ruby.h enumerator.$(OBJEXT): $(top_srcdir)/include/ruby.h -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/