/usr/lib/ruby/vendor_ruby/rspec/core/flat_map.rb is in ruby-rspec-core 3.5.0c3e0m0s0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | module RSpec
module Core
# @private
module FlatMap
if [].respond_to?(:flat_map)
def flat_map(array, &block)
array.flat_map(&block)
end
else # for 1.8.7
# :nocov:
def flat_map(array, &block)
array.map(&block).flatten(1)
end
# :nocov:
end
module_function :flat_map
end
end
end
|