diff options
author | Victor Shepelev <zverok.offline@gmail.com> | 2023-12-14 23:01:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-14 23:01:48 +0200 |
commit | 570d7b2c3e2ee39e07548dfe242b684ec794789d (patch) | |
tree | ee123eb1d1a8680ee9fd5f7c7a873a120acd833d /dir.c | |
parent | d3deb1b8232a303dd40909e32f939bad3b24a8af (diff) |
[DOC] Adjust some new features wording/examples. (#9183)
* Reword Range#overlap? docs last paragraph.
* Docs: add explanation about Queue#freeze
* Docs: Add :rescue event docs for TracePoint
* Docs: Enhance Module#set_temporary_name documentation
* Docs: Slightly expand Process::Status deprecations
* Fix MatchData#named_captures rendering glitch
* Improve Dir.fchdir examples
* Adjust Refinement#target docs
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1254,10 +1254,8 @@ fchdir_restore(VALUE v) * Dir.pwd # => "/var/spool/mail" * dir = Dir.new('/usr') * fd = dir.fileno - * Dir.fchdir(fd) do - * Dir.pwd # => "/usr" - * end - * Dir.pwd # => "/var/spool/mail" + * Dir.fchdir(fd) + * Dir.pwd # => "/usr" * * With a block, temporarily changes the working directory: * @@ -1271,7 +1269,9 @@ fchdir_restore(VALUE v) * * Dir.chdir('/var/spool/mail') * Dir.pwd # => "/var/spool/mail" - * Dir.chdir('/tmp') do + * dir = Dir.new('/tmp') + * fd = dir.fileno + * Dir.fchdir(fd) do * Dir.pwd # => "/tmp" * end * Dir.pwd # => "/var/spool/mail" |