[前][次][番号順一覧][スレッド一覧]

ruby-changes:56438

From: Benoit <ko1@a...>
Date: Sat, 13 Jul 2019 22:55:55 +0900 (JST)
Subject: [ruby-changes:56438] Benoit Daloze: 6ef73c1472 (master): Improve documentation in doc/globals.rdoc

https://git.ruby-lang.org/ruby.git/commit/?id=6ef73c1472

From 6ef73c14725b90ae1fb0ec017564d560d05d8c01 Mon Sep 17 00:00:00 2001
From: Benoit Daloze <eregontp@g...>
Date: Sat, 13 Jul 2019 15:47:37 +0200
Subject: Improve documentation in doc/globals.rdoc


diff --git a/doc/globals.rdoc b/doc/globals.rdoc
index 8729ff2..083b2a1 100644
--- a/doc/globals.rdoc
+++ b/doc/globals.rdoc
@@ -2,8 +2,8 @@ https://github.com/ruby/ruby/blob/trunk/doc/globals.rdoc#L2
 
 == Pre-defined global variables
 
-$!::   The exception information message set by 'raise'.
-$@::   Array of backtrace of the last exception thrown.
+$!::   The Exception object set by Kernel#raise.
+$@::   The same as $!.backtrace.
 $~::   The information about the last match in the current scope (thread-local and frame-local).
 $&::   The string matched by the last successful match.
 $`::   The string to the left  of the last successful match.
@@ -12,18 +12,17 @@ $+::   The highest group matched by the last successful match. https://github.com/ruby/ruby/blob/trunk/doc/globals.rdoc#L12
 $1::   The Nth group of the last successful match. May be > 1.
 $=::   This variable is no longer effective. Deprecated.
 $/::   The input record separator, newline by default. Aliased to $-0.
-$\::   The output record separator for the print and IO#write. Default is nil.
-$,::   The output field separator for the print and Array#join. Non-nil $, will be deprecated.
+$\::   The output record separator for Kernel#print and IO#write. Default is nil.
+$,::   The output field separator for Kernel#print and Array#join. Non-nil $, will be deprecated.
 $;::   The default separator for String#split. Non-nil $; will be deprecated. Aliased to $-F.
 $.::   The current input line number of the last file that was read.
 $<::   The same as ARGF.
-$>::   The default output for print, printf. $stdout by default.
+$>::   The default output stream for Kernel#print and Kernel#printf. $stdout by default.
 $_::   The last input line of string by gets or readline.
 $0::   Contains the name of the script being executed. May be assignable.
 $*::   The same as ARGV.
-$$::   The process number of the Ruby running this script.
-$?::   The status of the last executed child process.  This value is
-       thread-local.
+$$::   The process number of the Ruby running this script. Same as Process.pid.
+$?::   The status of the last executed child process (thread-local).
 $LOAD_PATH::   Load path for searching Ruby scripts and extension libraries used
                by Kernel#load and Kernel#require. Aliased to $: and $-I.
                Has a singleton method $LOAD_PATH.resolve_feature_path(feature)
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]