diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-16 12:29:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-16 12:29:23 +0000 |
commit | d0c21d05b546bd0ccd2f731b7480a0be57186003 (patch) | |
tree | c5294999d76b4c61c46e1e181a0a2ca0a391c3d8 | |
parent | 89be9299057c7784a7c15a7ca06ff9718ae562eb (diff) | |
download | ruby-d0c21d05b546bd0ccd2f731b7480a0be57186003.tar.gz |
string.c: remove redundant calls
* string.c (rb_str_enumerate_lines): do not check if a block is
given twice. RETURN_ENUMERATOR includes rb_block_given_p()
check which is redundant here.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -6709,7 +6709,7 @@ rb_str_enumerate_lines(int argc, VALUE *argv, VALUE str, int wantarray) if (wantarray) ary = rb_ary_new(); else - RETURN_ENUMERATOR(str, argc, argv); + return SIZED_ENUMERATOR(str, argc, argv, 0); } if (NIL_P(rs)) { |