mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[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
This commit is contained in:
parent
d3deb1b823
commit
570d7b2c3e
8 changed files with 65 additions and 47 deletions
10
dir.c
10
dir.c
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue