* 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
This commit is contained in:
drbrain 2011-05-22 02:12:15 +00:00
parent d235b822d2
commit 55aa4dce3b
2 changed files with 9 additions and 0 deletions

View File

@ -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> Sun May 22 11:07:47 2011 Eric Hodel <drbrain@segment7.net>
* ext/curses/curses.c: Complete documentation. Patch by Vincent * ext/curses/curses.c: Complete documentation. Patch by Vincent

View File

@ -115,6 +115,10 @@ module FileUtils
# #
# FileUtils.cd('/', :verbose => true) # chdir and report it # 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 def cd(dir, options = {}, &block) # :yield: dir
fu_check_options options, OPT_TABLE['cd'] fu_check_options options, OPT_TABLE['cd']
fu_output_message "cd #{dir}" if options[:verbose] fu_output_message "cd #{dir}" if options[:verbose]