string.c: STRING_ENUMERATORS_WANTARRAY

* string.c (STRING_ENUMERATORS_WANTARRAY): name preprocessing
  codition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-02-25 04:54:27 +00:00
parent 5919370363
commit 2c183f5520

View File

@ -29,6 +29,8 @@
#include <unistd.h>
#endif
#define STRING_ENUMERATORS_WANTARRAY 0 /* next major */
#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
#undef rb_str_new_cstr
@ -6115,7 +6117,7 @@ rb_str_enumerate_lines(int argc, VALUE *argv, VALUE str, int wantarray)
if (rb_block_given_p()) {
if (wantarray) {
#if 0 /* next major */
#if STRING_ENUMERATORS_WANTARRAY
rb_warn("given block not used");
ary = rb_ary_new();
#else
@ -6297,7 +6299,7 @@ rb_str_enumerate_bytes(VALUE str, int wantarray)
if (rb_block_given_p()) {
if (wantarray) {
#if 0 /* next major */
#if STRING_ENUMERATORS_WANTARRAY
rb_warn("given block not used");
ary = rb_ary_new();
#else
@ -6390,7 +6392,7 @@ rb_str_enumerate_chars(VALUE str, int wantarray)
if (rb_block_given_p()) {
if (wantarray) {
#if 0 /* next major */
#if STRING_ENUMERATORS_WANTARRAY
rb_warn("given block not used");
ary = rb_ary_new();
#else
@ -6493,7 +6495,7 @@ rb_str_enumerate_codepoints(VALUE str, int wantarray)
if (rb_block_given_p()) {
if (wantarray) {
#if 0 /* next major */
#if STRING_ENUMERATORS_WANTARRAY
rb_warn("given block not used");
ary = rb_ary_new();
#else