1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

$: changed

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 1998-03-24 06:21:55 +00:00
parent 3fe16354fb
commit 24a8209146
4 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,9 @@
Tue Mar 24 12:50:06 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* ruby.c (ruby_prog_init): `.' should come last in the load-path.
* eval.c (Init_eval): `__send__', alias for `send'.
Mon Mar 23 12:44:12 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* string.c (str_chomp_bang): now takes rs as an argument.

1
eval.c
View file

@ -4371,6 +4371,7 @@ Init_eval()
rb_define_global_function("global_variables", f_global_variables, 0);
rb_define_method(mKernel, "send", f_send, -1);
rb_define_method(mKernel, "__send__", f_send, -1);
rb_define_method(mKernel, "instance_eval", obj_instance_eval, 1);
rb_define_private_method(cModule, "append_features", mod_append_features, 1);

View file

@ -20,7 +20,7 @@ class Delegator
end
for method in obj.methods
next if preserved.include? method
eval "def self.#{method}(*args); __getobj__.send :#{method}, *args; end"
eval "def self.#{method}(*args); __getobj__.__send__ :#{method}, *args; end"
end
end

7
ruby.c
View file

@ -685,6 +685,10 @@ ruby_prog_init()
rb_define_readonly_variable("$-p", &do_print);
rb_define_readonly_variable("$-l", &do_line);
if (rb_safe_level() == 0) {
addpath(".");
}
#if defined(_WIN32) || defined(DJGPP)
addpath(ruby_libpath());
#endif
@ -701,9 +705,6 @@ ruby_prog_init()
addpath(RUBY_ARCHLIB);
#endif
addpath(RUBY_LIB);
if (rb_safe_level() == 0) {
addpath(".");
}
rb_define_hooked_variable("$0", &rb_progname, 0, set_arg0);