mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-enum-chain: add parentheses to to_enum call
added parentheses to to_enum call where the return value is used, explicitly specifying :each for readability. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -66,7 +66,7 @@ class Enumerator
|
||||
# # prints: 1, 2, 3, 4, 5
|
||||
#
|
||||
def each(&block)
|
||||
return to_enum unless block
|
||||
return to_enum(:each) unless block
|
||||
|
||||
i = 0
|
||||
while i < @enums.size
|
||||
|
||||
Reference in New Issue
Block a user