Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opal/corelib/enumerable.rb
Original file line number Diff line number Diff line change
@@ -318,7 +318,7 @@ def each_slice(n, &block)
slice.push(param);
if (slice.length === n) {
if (block(slice) === $breaker) {
if ($opal.$yield1(block, slice) === $breaker) {
result = $breaker.$v;
return $breaker;
}
@@ -335,7 +335,7 @@ def each_slice(n, &block)
// our "last" group, if smaller than n then won't have been yielded
if (slice.length > 0) {
if (block(slice) === $breaker) {
if ($opal.$yield1(block, slice) === $breaker) {
return $breaker.$v;
}
}

0 comments on commit bafc36a

Please sign in to comment.