このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ

Ruby 2.5.0 リファレンスマニュアル

instance method Rake::FileList#gsub

gsub(pattern, replace) -> Rake::FileList[permalink][rdoc]

自身に含まれるファイルリストのそれぞれのエントリに対して String#gsub を実行し、結果を新しい Rake::FileList として返します。

例:

FileList['lib/test/file', 'x/y'].gsub(/\//, "\\") # => ['lib\\test\\file', 'x\\y']