mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
db2fe4b8ef
commit
ffd76ff3b5
1 changed files with 1 additions and 1 deletions
2
string.c
2
string.c
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue