mruby-enumerator: add parentheses to to_enum calls

added parentheses to all to_enum calls where the return value is used.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-12-04 19:27:04 +09:00
parent 2e71944f2b
commit 284dde6a3f
@@ -164,7 +164,7 @@ class Enumerator
# `offset`:: the starting index to use
#
def with_index(offset=0, &block)
return to_enum :with_index, offset unless block
return to_enum(:with_index, offset) unless block
if offset.nil?
offset = 0
@@ -762,7 +762,7 @@ module Enumerable
# e = a.chunk{|i| i < 0 ? :_separator : true }
# e.to_a # => [[true, [0, 0]], [true, [1, 1]]]
def chunk(&block)
return to_enum :chunk unless block
return to_enum(:chunk) unless block
enum = self
Enumerator.new do |y|