mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user