diff options
Diffstat (limited to 'lib/English.rb')
| -rw-r--r-- | lib/English.rb | 72 |
1 files changed, 27 insertions, 45 deletions
diff --git a/lib/English.rb b/lib/English.rb index da50dfdc29..bf7896dcd6 100644 --- a/lib/English.rb +++ b/lib/English.rb @@ -9,7 +9,7 @@ # "waterbuffalo" =~ /buff/ # print $', $$, "\n" # -# With English: +# With 'English': # # require "English" # @@ -20,31 +20,30 @@ # Below is a full list of descriptive aliases and their associated global # variable: # -# $ERROR_INFO:: $! -# $ERROR_POSITION:: $@ -# $FS:: $; -# $FIELD_SEPARATOR:: $; -# $OFS:: $, -# $OUTPUT_FIELD_SEPARATOR:: $, -# $RS:: $/ -# $INPUT_RECORD_SEPARATOR:: $/ -# $ORS:: $\ -# $OUTPUT_RECORD_SEPARATOR:: $\ -# $INPUT_LINE_NUMBER:: $. -# $NR:: $. -# $LAST_READ_LINE:: $_ -# $DEFAULT_OUTPUT:: $> -# $DEFAULT_INPUT:: $< -# $PID:: $$ -# $PROCESS_ID:: $$ -# $CHILD_STATUS:: $? -# $LAST_MATCH_INFO:: $~ -# $IGNORECASE:: $= -# $ARGV:: $* -# $MATCH:: $& -# $PREMATCH:: $` -# $POSTMATCH:: $' -# $LAST_PAREN_MATCH:: $+ +# <tt>$ERROR_INFO</tt>:: <tt>$!</tt> +# <tt>$ERROR_POSITION</tt>:: <tt>$@</tt> +# <tt>$FS</tt>:: <tt>$;</tt> +# <tt>$FIELD_SEPARATOR</tt>:: <tt>$;</tt> +# <tt>$OFS</tt>:: <tt>$,</tt> +# <tt>$OUTPUT_FIELD_SEPARATOR</tt>:: <tt>$,</tt> +# <tt>$RS</tt>:: <tt>$/</tt> +# <tt>$INPUT_RECORD_SEPARATOR</tt>:: <tt>$/</tt> +# <tt>$ORS</tt>:: <tt>$\</tt> +# <tt>$OUTPUT_RECORD_SEPARATOR</tt>:: <tt>$\</tt> +# <tt>$NR</tt>:: <tt>$.</tt> +# <tt>$INPUT_LINE_NUMBER</tt>:: <tt>$.</tt> +# <tt>$LAST_READ_LINE</tt>:: <tt>$_</tt> +# <tt>$DEFAULT_OUTPUT</tt>:: <tt>$></tt> +# <tt>$DEFAULT_INPUT</tt>:: <tt>$<</tt> +# <tt>$PID</tt>:: <tt>$$</tt> +# <tt>$PROCESS_ID</tt>:: <tt>$$</tt> +# <tt>$CHILD_STATUS</tt>:: <tt>$?</tt> +# <tt>$LAST_MATCH_INFO</tt>:: <tt>$~</tt> +# <tt>$ARGV</tt>:: <tt>$*</tt> +# <tt>$MATCH</tt>:: <tt>$&</tt> +# <tt>$PREMATCH</tt>:: <tt>$`</tt> +# <tt>$POSTMATCH</tt>:: <tt>$'</tt> +# <tt>$LAST_PAREN_MATCH</tt>:: <tt>$+</tt> # module English end if false @@ -58,44 +57,32 @@ alias $ERROR_POSITION $@ # The default separator pattern used by String#split. May be set from # the command line using the <code>-F</code> flag. alias $FS $; - -# The default separator pattern used by String#split. May be set from -# the command line using the <code>-F</code> flag. alias $FIELD_SEPARATOR $; # The separator string output between the parameters to methods such # as Kernel#print and Array#join. Defaults to +nil+, which adds no # text. -alias $OFS $, # The separator string output between the parameters to methods such # as Kernel#print and Array#join. Defaults to +nil+, which adds no # text. +alias $OFS $, alias $OUTPUT_FIELD_SEPARATOR $, # The input record separator (newline by default). This is the value # that routines such as Kernel#gets use to determine record # boundaries. If set to +nil+, +gets+ will read the entire file. alias $RS $/ - -# The input record separator (newline by default). This is the value -# that routines such as Kernel#gets use to determine record -# boundaries. If set to +nil+, +gets+ will read the entire file. alias $INPUT_RECORD_SEPARATOR $/ # The string appended to the output of every call to methods such as # Kernel#print and IO#write. The default value is +nil+. alias $ORS $\ - -# The string appended to the output of every call to methods such as -# Kernel#print and IO#write. The default value is +nil+. alias $OUTPUT_RECORD_SEPARATOR $\ # The number of the last line read from the current input file. -alias $INPUT_LINE_NUMBER $. - -# The number of the last line read from the current input file. alias $NR $. +alias $INPUT_LINE_NUMBER $. # The last line read by Kernel#gets or # Kernel#readline. Many string-related functions in the @@ -135,8 +122,6 @@ alias $DEFAULT_INPUT $< # The process number of the program being executed. Read only. alias $PID $$ - -# The process number of the program being executed. Read only. alias $PROCESS_ID $$ # The exit status of the last child process to terminate. Read @@ -151,9 +136,6 @@ alias $CHILD_STATUS $? # scope. alias $LAST_MATCH_INFO $~ -# This variable is no longer effective. Deprecated. -alias $IGNORECASE $= - # An array of strings containing the command-line # options from the invocation of the program. Options # used by the Ruby interpreter will have been |
