From 2c183f552034ac32a026daeed2c95839fefa34b5 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 25 Feb 2013 04:54:27 +0000 Subject: 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 --- string.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'string.c') diff --git a/string.c b/string.c index cbfac397fc..3bb3c5f3c0 100644 --- a/string.c +++ b/string.c @@ -29,6 +29,8 @@ #include #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 -- cgit v1.2.3