mruby-string-ext: add parentheses to to_enum call

added parentheses to to_enum call 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:38:13 +09:00
parent 29644b0365
commit 75d7b8ed7c
+1 -1
View File
@@ -4,7 +4,7 @@ class String
# Call the given block for each character of
# `self`.
def each_char(&block)
return to_enum :each_char unless block
return to_enum(:each_char) unless block
pos = 0
while pos < self.size
block.call(self[pos])