lib/quality_extensions/pathname.rb in quality_extensions-1.3.1 vs lib/quality_extensions/pathname.rb in quality_extensions-1.3.2
- old
+ new
@@ -102,11 +102,14 @@
#
# Updates modification time (mtime) and access time (atime) of file(s) in list. Files are created if they don’t exist.
#
# FileUtils.touch 'timestamp'
# FileUtils.touch Dir.glob('*.c'); system 'make'
+ #
+ # Returns self. This is different from FileUtils.touch, which returns an array of filenames.
+ #
def touch
- FileUtils.touch self.to_s
+ tap {|file| FileUtils.touch file.to_s }
end
# Moves self to +new_path+ using FileUtils.mv.
#
# See documentation for FileUtils.mv for a list of valid +options+.