mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-object-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:
@@ -8,7 +8,7 @@ module Kernel
|
||||
# 'my string'.yield_self {|s|s.upcase} #=> "MY STRING"
|
||||
#
|
||||
def yield_self(&block)
|
||||
return to_enum :yield_self unless block
|
||||
return to_enum(:yield_self) unless block
|
||||
block.call(self)
|
||||
end
|
||||
alias then yield_self
|
||||
|
||||
Reference in New Issue
Block a user