mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-enum-ext: filter_map should not ignore index; fix #6504
This commit is contained in:
@@ -820,8 +820,8 @@ module Enumerable
|
||||
return to_enum(:filter_map) unless blk
|
||||
|
||||
ary = []
|
||||
self.each do |x|
|
||||
x = blk.call(x)
|
||||
self.each do |*x|
|
||||
x = blk.call(*x)
|
||||
ary.push x if x
|
||||
end
|
||||
ary
|
||||
|
||||
Reference in New Issue
Block a user