From 55aa4dce3bc550617e16de91eba315a41baac2b9 Mon Sep 17 00:00:00 2001 From: drbrain Date: Sun, 22 May 2011 02:12:15 +0000 Subject: [PATCH] * lib/fileutils.rb: Document block behavior of FileUtils.cd. Patch by Bil Kleb. [Ruby 1.9 - Bug 4751] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/fileutils.rb | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 315ca46d7f..bdf6e75d12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun May 22 11:11:41 2011 Eric Hodel + + * lib/fileutils.rb: Document block behavior of FileUtils.cd. Patch by + Bil Kleb. [Ruby 1.9 - Bug 4751] + Sun May 22 11:07:47 2011 Eric Hodel * ext/curses/curses.c: Complete documentation. Patch by Vincent diff --git a/lib/fileutils.rb b/lib/fileutils.rb index de79f840bc..d4213dd0be 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -115,6 +115,10 @@ module FileUtils # # FileUtils.cd('/', :verbose => true) # chdir and report it # + # FileUtils.cd('/') do # chdir + # [...] # do something + # end # return to original directory + # def cd(dir, options = {}, &block) # :yield: dir fu_check_options options, OPT_TABLE['cd'] fu_output_message "cd #{dir}" if options[:verbose]