mruby-enum-ext: filter_map should not ignore index; fix #6504

This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-04-05 21:44:49 +09:00
parent 9750513c25
commit cb8cd9388c
+2 -2
View File
@@ -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