From 4592e15e3500e7de8d6d00cfb66af53971735c59 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 15 Jul 2015 01:29:37 +0000 Subject: [PATCH] string.c: remove redundant calls * string.c (rb_str_enumerate_bytes, rb_str_enumerate_codepoints): do not check if a block is given twice. RETURN_SIZED_ENUMERATOR includes rb_block_given_p() check which is redundant here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/string.c b/string.c index 03922e56c1..941fb4b4f0 100644 --- a/string.c +++ b/string.c @@ -6878,7 +6878,7 @@ rb_str_enumerate_bytes(VALUE str, int wantarray) if (wantarray) ary = rb_ary_new2(RSTRING_LEN(str)); else - RETURN_SIZED_ENUMERATOR(str, 0, 0, rb_str_each_byte_size); + return SIZED_ENUMERATOR(str, 0, 0, rb_str_each_byte_size); } for (i=0; i