summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-25 04:54:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-25 04:54:27 +0000
commit2c183f552034ac32a026daeed2c95839fefa34b5 (patch)
treec827542161488beae9730c86dbcd9916a9654ce5 /string.c
parent5919370363cd39a04bb3e848b1e15f9c2f1b3ce3 (diff)
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
Diffstat (limited to 'string.c')
-rw-r--r--string.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/string.c b/string.c
index cbfac397fc..3bb3c5f3c0 100644
--- a/string.c
+++ b/string.c
@@ -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