1 # Include the English library file in a Ruby script, and you can
2 # reference the global variables such as \VAR{\$\_} using less
3 # cryptic names, listed in the following table.% \vref{tab:english}.
8 # "waterbuffalo" =~ /buff/
9 # print $", $', $$, "\n"
15 # $OUTPUT_FIELD_SEPARATOR = ' -- '
16 # "waterbuffalo" =~ /buff/
17 # print $LOADED_FEATURES, $POSTMATCH, $PID, "\n"
20 # The exception object passed to +raise+.
23 # The stack backtrace generated by the last
24 # exception. <tt>See Kernel.caller</tt> for details. Thread local.
25 alias $ERROR_POSITION $@
27 # The default separator pattern used by <tt>String.split</tt>. May be
28 # set from the command line using the <tt>-F</tt> flag.
31 # The default separator pattern used by <tt>String.split</tt>. May be
32 # set from the command line using the <tt>-F</tt> flag.
33 alias $FIELD_SEPARATOR $;
35 # The separator string output between the parameters to methods such
36 # as <tt>Kernel.print</tt> and <tt>Array.join</tt>. Defaults to +nil+,
40 # The separator string output between the parameters to methods such
41 # as <tt>Kernel.print</tt> and <tt>Array.join</tt>. Defaults to +nil+,
43 alias $OUTPUT_FIELD_SEPARATOR $,
45 # The input record separator (newline by default). This is the value
46 # that routines such as <tt>Kernel.gets</tt> use to determine record
47 # boundaries. If set to +nil+, +gets+ will read the entire file.
50 # The input record separator (newline by default). This is the value
51 # that routines such as <tt>Kernel.gets</tt> use to determine record
52 # boundaries. If set to +nil+, +gets+ will read the entire file.
53 alias $INPUT_RECORD_SEPARATOR $/
55 # The string appended to the output of every call to methods such as
56 # <tt>Kernel.print</tt> and <tt>IO.write</tt>. The default value is
60 # The string appended to the output of every call to methods such as
61 # <tt>Kernel.print</tt> and <tt>IO.write</tt>. The default value is
63 alias $OUTPUT_RECORD_SEPARATOR $\
65 # The number of the last line read from the current input file.
66 alias $INPUT_LINE_NUMBER $.
68 # The number of the last line read from the current input file.
71 # The last line read by <tt>Kernel.gets</tt> or
72 # <tt>Kernel.readline</tt>. Many string-related functions in the
73 # +Kernel+ module operate on <tt>$_</tt> by default. The variable is
74 # local to the current scope. Thread local.
75 alias $LAST_READ_LINE $_
77 # The destination of output for <tt>Kernel.print</tt>
78 # and <tt>Kernel.printf</tt>. The default value is
80 alias $DEFAULT_OUTPUT $>
82 # An object that provides access to the concatenation
83 # of the contents of all the files
84 # given as command-line arguments, or <tt>$stdin</tt>
85 # (in the case where there are no
86 # arguments). <tt>$<</tt> supports methods similar to a
89 # <tt>closed?</tt>, +each+,
90 # <tt>each_byte</tt>, <tt>each_line</tt>,
91 # +eof+, <tt>eof?</tt>, +file+,
92 # +filename+, +fileno+,
93 # +getc+, +gets+, +lineno+,
94 # <tt>lineno=</tt>, +path+,
95 # +pos+, <tt>pos=</tt>,
97 # +readline+, +readlines+,
98 # +rewind+, +seek+, +skip+,
99 # +tell+, <tt>to_a</tt>, <tt>to_i</tt>,
100 # <tt>to_io</tt>, <tt>to_s</tt>, along with the
101 # methods in +Enumerable+. The method +file+
102 # returns a +File+ object for the file currently
103 # being read. This may change as <tt>$<</tt> reads
104 # through the files on the command line. Read only.
105 alias $DEFAULT_INPUT $<
107 # The process number of the program being executed. Read only.
110 # The process number of the program being executed. Read only.
113 # The exit status of the last child process to terminate. Read
114 # only. Thread local.
115 alias $CHILD_STATUS $?
117 # A +MatchData+ object that encapsulates the results of a successful
118 # pattern match. The variables <tt>$&</tt>, <tt>$`</tt>, <tt>$'</tt>,
119 # and <tt>$1</tt> to <tt>$9</tt> are all derived from
120 # <tt>$~</tt>. Assigning to <tt>$~</tt> changes the values of these
121 # derived variables. This variable is local to the current
122 # scope. Thread local.
123 alias $LAST_MATCH_INFO $~
125 # If set to any value apart from +nil+ or +false+, all pattern matches
126 # will be case insensitive, string comparisons will ignore case, and
127 # string hash values will be case insensitive. Deprecated
130 # An array of strings containing the command-line
131 # options from the invocation of the program. Options
132 # used by the Ruby interpreter will have been
133 # removed. Read only. Also known simply as +ARGV+.
136 # The string matched by the last successful pattern
137 # match. This variable is local to the current
138 # scope. Read only. Thread local.
141 # The string preceding the match in the last
142 # successful pattern match. This variable is local to
143 # the current scope. Read only. Thread local.
146 # The string following the match in the last
147 # successful pattern match. This variable is local to
148 # the current scope. Read only. Thread local.
151 # The contents of the highest-numbered group matched in the last
152 # successful pattern match. Thus, in <tt>"cat" =~ /(c|a)(t|z)/</tt>,
153 # <tt>$+</tt> will be set to "t". This variable is local to the
154 # current scope. Read only. Thread local.
155 alias $LAST_PAREN_MATCH $+