summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-03 03:25:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-03 03:25:12 +0000
commitaaed10716a55d659309a8636a41a8e159347a32c (patch)
treed9a33dfbc48ae8022a308636fe535ad3ec3052c6 /string.c
parentc95b3a16bdf6c9a40c3ce23734b38c1982609712 (diff)
intern.h: SIZED_ENUMERATOR
* include/ruby/intern.h (SIZED_ENUMERATOR): separate from RETURN_SIZED_ENUMERATOR. * string.c (rb_str_enumerate_chars): get rid of calling rb_block_given_p() twice. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 4a0df2aecb..88185cfb0b 100644
--- a/string.c
+++ b/string.c
@@ -6810,7 +6810,7 @@ rb_str_enumerate_chars(VALUE str, int wantarray)
if (wantarray)
ary = rb_ary_new_capa(str_strlen(str, enc)); /* str's enc*/
else
- RETURN_SIZED_ENUMERATOR(str, 0, 0, rb_str_each_char_size);
+ return SIZED_ENUMERATOR(str, 0, 0, rb_str_each_char_size);
}
switch (ENC_CODERANGE(str)) {