Diffstat (limited to 'doc')
1 files changed, 7 insertions, 8 deletions
diff --git a/doc/globals.rdoc b/doc/globals.rdoc
index 8729ff2134..083b2a18cb 100644
@@ -2,8 +2,8 @@
== 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.
$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
+$$:: 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)