diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-02 09:57:47 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-02 09:57:47 +0000 |
commit | f6f388a5bdbd3d3a68bf18f3352ba2be12688639 (patch) | |
tree | 3bdfb745e956666c70e078e9f3243a3a5b54c417 /array.c | |
parent | d64a73e1ddba8706617205dab4e640f5ce7191b0 (diff) |
* array.c, enum.c, insns.def, io.c, numeric.c, parse.y, process.c,
range.c: use prepared IDs.
A patch from charliesome (Charlie Somerville).
[Bug #7495]
* common.mk: add dependency to id.h.
* common.mk: replace ID_H_INCLUDES with id.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -17,6 +17,7 @@ #include "ruby/encoding.h" #include "internal.h" #include "probes.h" +#include "id.h" #ifndef ARRAY_DEBUG # define NDEBUG @@ -3045,7 +3046,7 @@ take_items(VALUE obj, long n) if (!NIL_P(result)) return rb_ary_subseq(result, 0, n); result = rb_ary_new2(n); args[0] = result; args[1] = (VALUE)n; - if (rb_check_block_call(obj, rb_intern("each"), 0, 0, take_i, (VALUE)args) == Qundef) + if (rb_check_block_call(obj, idEach, 0, 0, take_i, (VALUE)args) == Qundef) Check_Type(obj, T_ARRAY); return result; } |