mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-enum-ext: add parentheses to respond_to? call
added parentheses to respond_to? call where the return value is used. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -273,7 +273,7 @@ module Enumerable
|
||||
ary = []
|
||||
self.each do |*e|
|
||||
e2 = block.call(*e)
|
||||
if e2.respond_to? :each
|
||||
if e2.respond_to?(:each)
|
||||
e2.each {|e3| ary.push(e3) }
|
||||
else
|
||||
ary.push(e2)
|
||||
|
||||
Reference in New Issue
Block a user