Skip to content

Commit 89a83a0

Browse files
authored
Merge pull request #26 from colby-swandale/improve-chdir-doc
improve the documentation of FileUtils.cd
2 parents a17cfe4 + 079acca commit 89a83a0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/fileutils.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,14 @@ def pwd
114114
#
115115
# Changes the current directory to the directory +dir+.
116116
#
117-
# If this method is called with block, resumes to the old
118-
# working directory after the block execution finished.
117+
# If this method is called with block, resumes to the previous
118+
# working directory after the block execution has finished.
119119
#
120-
# FileUtils.cd('/', :verbose => true) # chdir and report it
120+
# FileUtils.cd('/') # change directory
121121
#
122-
# FileUtils.cd('/') do # chdir
122+
# FileUtils.cd('/', :verbose => true) # change directory and report it
123+
#
124+
# FileUtils.cd('/') do # change directory
123125
# # ... # do something
124126
# end # return to original directory
125127
#

0 commit comments

Comments
 (0)