Skip to content

Instantly share code, notes, and snippets.

@iain
Created April 30, 2012 21:58
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iain/2563017 to your computer and use it in GitHub Desktop.
Save iain/2563017 to your computer and use it in GitHub Desktop.
global variables in Ruby and the 'english' extension
>> global_variables
=> [:$;, :$-F, :$@, :$!, :$SAFE, :$~, :$&, :$`, :$', :$+, :$=, :$KCODE, :$-K, :$,, :$/, :$-0,
:$\, :$_, :$stdin, :$stdout, :$stderr, :$>, :$<, :$., :$FILENAME, :$-i, :$*, :$?, :$$, :$:,
:$-I, :$LOAD_PATH, :$", :$LOADED_FEATURES, :$VERBOSE, :$-v, :$-w, :$-W, :$DEBUG, :$-d, :$0,
:$PROGRAM_NAME, :$-p, :$-l, :$-a, :$binding, :$1, :$2, :$3, :$4, :$5, :$6, :$7, :$8, :$9]
>> require 'english'
=> true
>> global_variables
=> [:$;, :$-F, :$@, :$!, :$SAFE, :$~, :$&, :$`, :$', :$+, :$=, :$KCODE, :$-K, :$,, :$/, :$-0,
:$\, :$_, :$stdin, :$stdout, :$stderr, :$>, :$<, :$., :$FILENAME, :$-i, :$*, :$?, :$$, :$:,
:$-I, :$LOAD_PATH, :$", :$LOADED_FEATURES, :$VERBOSE, :$-v, :$-w, :$-W, :$DEBUG, :$-d, :$0,
:$PROGRAM_NAME, :$-p, :$-l, :$-a, :$binding, :$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,
:$1, :$2, :$3, :$4, :$5, :$6, :$7, :$8, :$9]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment