# File lib/backports/2.0.0/enumerable/lazy.rb, line 163 def flat_map raise ArgumentError, "tried to call lazy flat_map without a block" unless block_given? Lazy.new(self) do |yielder, *values| result = yield(*values) ary = Backports.is_array?(result) if ary || (result.respond_to?(:each) && result.respond_to?(:force)) (ary || result).each{|x| yielder << x } else yielder << result end end.__set_inspect :flat_map end