Skip to content

Commit ad07498

Browse files
author
aamine
committed
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 3627595 commit ad07498

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Sun Apr 4 20:33:42 2004 Minero Aoki <aamine@loveruby.net>
2+
3+
* eval.c (Init_load): make $LOADED_FEATURES built-in.
4+
[ruby-dev:23299]
5+
6+
* ruby.c (ruby_prog_init): make $PROGRAM_NAME built-in.
7+
8+
* lib/English.rb: remove $LOADED_FEATURES and $PROGRAM_NAME.
9+
110
Sun Apr 4 14:01:20 2004 Dave Thomas <dave@pragprog.com>
211

312
* lib/rdoc/options.rb (Options::parse): Allow multiple -x options to RDoc.

eval.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7684,6 +7684,7 @@ Init_load()
76847684

76857685
rb_features = rb_ary_new();
76867686
rb_define_readonly_variable("$\"", &rb_features);
7687+
rb_define_readonly_variable("$LOADED_FEATURES", &rb_features);
76877688

76887689
rb_define_global_function("load", rb_f_load, -1);
76897690
rb_define_global_function("require", rb_f_require, 1);

lib/English.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
# exception. <tt>See Kernel.caller</tt> for details. Thread local.
2525
alias $ERROR_POSITION $@
2626

27-
# An array containing the filenames of modules loaded by +require+.
28-
alias $LOADED_FEATURES $"
29-
3027
# The default separator pattern used by <tt>String.split</tt>. May be
3128
# set from the command line using the <tt>-F</tt> flag.
3229
alias $FS $;
@@ -130,12 +127,6 @@
130127
# string hash values will be case insensitive. Deprecated
131128
alias $IGNORECASE $=
132129

133-
# The name of the top-level Ruby program being executed. Typically
134-
# this will be the program's filename. On some operating systems,
135-
# assigning to this variable will change the name of the process
136-
# reported (for example) by the <tt>ps(1)</tt> command.
137-
alias $PROGRAM_NAME $0
138-
139130
# An array of strings containing the command-line
140131
# options from the invocation of the program. Options
141132
# used by the Ruby interpreter will have been

ruby.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,7 @@ ruby_prog_init()
10631063
rb_define_readonly_variable("$-l", &do_line);
10641064

10651065
rb_define_hooked_variable("$0", &rb_progname, 0, set_arg0);
1066+
rb_define_hooked_variable("$PROGRAM_NAME", &rb_progname, 0, set_arg0);
10661067

10671068
rb_argv = rb_ary_new();
10681069
rb_define_readonly_variable("$*", &rb_argv);

0 commit comments

Comments
 (0)