mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
enum.c: make constant argument static
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d96eba12c2
commit
47db9cb456
2 changed files with 3 additions and 1 deletions
|
@ -1637,6 +1637,7 @@ enum.$(OBJEXT): {$(VPATH)}onigmo.h
|
|||
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
|
||||
|
|
3
enum.c
3
enum.c
|
@ -12,6 +12,7 @@
|
|||
#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 obj)
|
|||
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)) {
|
||||
|
|
Loading…
Reference in a new issue