Skip to content

Commit

Permalink
* eval.c (Init_load): make $LOADED_FEATURES built-in. [ruby-dev:23299]
Browse files Browse the repository at this point in the history
* ruby.c (ruby_prog_init): make $PROGRAM_NAME built-in.
* lib/English.rb: remove $LOADED_FEATURES and $PROGRAM_NAME.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
aamine committed Apr 2, 2004
1 parent b7552a5 commit 6dcbfbc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
@@ -1,3 +1,12 @@
Fri Apr 2 11:36:20 2004 Minero Aoki <aamine@loveruby.net>

* eval.c (Init_load): make $LOADED_FEATURES built-in.
[ruby-dev:23299]

* ruby.c (ruby_prog_init): make $PROGRAM_NAME built-in.

* lib/English.rb: remove $LOADED_FEATURES and $PROGRAM_NAME.

Fri Apr 2 07:31:38 2004 Yukihiro Matsumoto <matz@ruby-lang.org>

* ext/socket/socket.c: mistakingly removed do_not_reverse_lookup.
Expand Down
1 change: 1 addition & 0 deletions eval.c
Expand Up @@ -7643,6 +7643,7 @@ Init_load()

rb_features = rb_ary_new();
rb_define_readonly_variable("$\"", &rb_features);
rb_define_readonly_variable("$LOADED_FEATURES", &rb_features);

rb_define_global_function("load", rb_f_load, -1);
rb_define_global_function("require", rb_f_require, 1);
Expand Down
9 changes: 0 additions & 9 deletions lib/English.rb
Expand Up @@ -24,9 +24,6 @@
# exception. <tt>See Kernel.caller</tt> for details. Thread local.
alias $ERROR_POSITION $@

# An array containing the filenames of modules loaded by +require+.
alias $LOADED_FEATURES $"

# The default separator pattern used by <tt>String.split</tt>. May be
# set from the command line using the <tt>-F</tt> flag.
alias $FS $;
Expand Down Expand Up @@ -130,12 +127,6 @@
# string hash values will be case insensitive. Deprecated
alias $IGNORECASE $=

# The name of the top-level Ruby program being executed. Typically
# this will be the program's filename. On some operating systems,
# assigning to this variable will change the name of the process
# reported (for example) by the <tt>ps(1)</tt> command.
alias $PROGRAM_NAME $0

# An array of strings containing the command-line
# options from the invocation of the program. Options
# used by the Ruby interpreter will have been
Expand Down
1 change: 1 addition & 0 deletions ruby.c
Expand Up @@ -1081,6 +1081,7 @@ ruby_prog_init()
rb_define_readonly_variable("$-l", &do_line);

rb_define_hooked_variable("$0", &rb_progname, 0, set_arg0);
rb_define_hooked_variable("$PROGRAM_NAME", &rb_progname, 0, set_arg0);

rb_argv = rb_ary_new();
rb_define_readonly_variable("$*", &rb_argv);
Expand Down

0 comments on commit 6dcbfbc

Please sign in to comment.