aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/fileutils.rb4
2 files changed, 9 insertions, 0 deletions
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 <drbrain@segment7.net>
+
+ * 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 <drbrain@segment7.net>
* 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]