From 079acca0251b1ae148f71c5c49f07da5632ffeab Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Mon, 17 Dec 2018 22:49:03 +1100 Subject: [PATCH] improve the documentation of FileUtils.cd --- lib/fileutils.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/fileutils.rb b/lib/fileutils.rb index dc72618..b201c35 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -114,12 +114,14 @@ def pwd # # Changes the current directory to the directory +dir+. # - # If this method is called with block, resumes to the old - # working directory after the block execution finished. + # If this method is called with block, resumes to the previous + # working directory after the block execution has finished. # - # FileUtils.cd('/', :verbose => true) # chdir and report it + # FileUtils.cd('/') # change directory # - # FileUtils.cd('/') do # chdir + # FileUtils.cd('/', :verbose => true) # change directory and report it + # + # FileUtils.cd('/') do # change directory # # ... # do something # end # return to original directory #