* eval.c (rb_eval): copy on write for argument local variable
assignment. * eval.c (assign): ditto. * eval.c (rb_call0): update ruby_frame->argv with the default value used for the optional arguments. * object.c (Init_Object): "===" calls rb_obj_equal() directly. [ruby-list:39937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ae7d870923
commit
bc667633d0
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
|||||||
|
Tue Jul 27 07:05:04 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* eval.c (rb_eval): copy on write for argument local variable
|
||||||
|
assignment.
|
||||||
|
|
||||||
|
* eval.c (assign): ditto.
|
||||||
|
|
||||||
|
* eval.c (rb_call0): update ruby_frame->argv with the default
|
||||||
|
value used for the optional arguments.
|
||||||
|
|
||||||
|
* object.c (Init_Object): "===" calls rb_obj_equal() directly.
|
||||||
|
[ruby-list:39937]
|
||||||
|
|
||||||
Mon Jul 26 11:22:55 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
Mon Jul 26 11:22:55 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||||
|
|
||||||
* lib/webrick/httputils.rb (WEBrick::HTTPUtils.escape): should
|
* lib/webrick/httputils.rb (WEBrick::HTTPUtils.escape): should
|
||||||
|
6
eval.c
6
eval.c
@ -1246,8 +1246,6 @@ ruby_init()
|
|||||||
Init_stack((void*)&state);
|
Init_stack((void*)&state);
|
||||||
Init_heap();
|
Init_heap();
|
||||||
PUSH_SCOPE();
|
PUSH_SCOPE();
|
||||||
ruby_scope->local_vars = 0;
|
|
||||||
ruby_scope->local_tbl = 0;
|
|
||||||
top_scope = ruby_scope;
|
top_scope = ruby_scope;
|
||||||
/* default visibility is private at toplevel */
|
/* default visibility is private at toplevel */
|
||||||
SCOPE_SET(SCOPE_PRIVATE);
|
SCOPE_SET(SCOPE_PRIVATE);
|
||||||
@ -3392,6 +3390,7 @@ rb_eval(self, n)
|
|||||||
if (ruby_scope->local_vars == 0)
|
if (ruby_scope->local_vars == 0)
|
||||||
rb_bug("unexpected local variable assignment");
|
rb_bug("unexpected local variable assignment");
|
||||||
result = rb_eval(self, node->nd_value);
|
result = rb_eval(self, node->nd_value);
|
||||||
|
if (node->nd_cnt < ruby_frame->argc + 2) scope_dup(ruby_scope);
|
||||||
ruby_scope->local_vars[node->nd_cnt] = result;
|
ruby_scope->local_vars[node->nd_cnt] = result;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -4954,6 +4953,7 @@ assign(self, lhs, val, pcall)
|
|||||||
case NODE_LASGN:
|
case NODE_LASGN:
|
||||||
if (ruby_scope->local_vars == 0)
|
if (ruby_scope->local_vars == 0)
|
||||||
rb_bug("unexpected local variable assignment");
|
rb_bug("unexpected local variable assignment");
|
||||||
|
if (lhs->nd_cnt < ruby_frame->argc + 2) scope_dup(ruby_scope);
|
||||||
ruby_scope->local_vars[lhs->nd_cnt] = val;
|
ruby_scope->local_vars[lhs->nd_cnt] = val;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -5617,7 +5617,7 @@ rb_call0(klass, recv, id, oid, argc, argv, body, nosuper)
|
|||||||
if (local_vars) {
|
if (local_vars) {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
/* +2 for $_ and $~ */
|
/* +2 for $_ and $~ */
|
||||||
MEMCPY(local_vars+2, argv, VALUE, i);
|
MEMCPY(local_vars+2, argv, VALUE, ruby_frame->argc);
|
||||||
}
|
}
|
||||||
argv += i; argc -= i;
|
argv += i; argc -= i;
|
||||||
if (node->nd_opt) {
|
if (node->nd_opt) {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
;;; (setq interpreter-mode-alist (append '(("ruby" . ruby-mode))
|
;;; (setq interpreter-mode-alist (append '(("ruby" . ruby-mode))
|
||||||
;;; interpreter-mode-alist))
|
;;; interpreter-mode-alist))
|
||||||
;;;
|
;;;
|
||||||
;;; (2) set to road inf-ruby and set inf-ruby key definition in ruby-mode.
|
;;; (2) set to load inf-ruby and set inf-ruby key definition in ruby-mode.
|
||||||
;;;
|
;;;
|
||||||
;;; (autoload 'run-ruby "inf-ruby"
|
;;; (autoload 'run-ruby "inf-ruby"
|
||||||
;;; "Run an inferior Ruby process")
|
;;; "Run an inferior Ruby process")
|
||||||
@ -35,6 +35,18 @@
|
|||||||
;;; HISTORY
|
;;; HISTORY
|
||||||
;;; senda - 8 Apr 1998: Created.
|
;;; senda - 8 Apr 1998: Created.
|
||||||
;;; $Log$
|
;;; $Log$
|
||||||
|
;;; Revision 1.7 2004/07/27 08:11:36 matz
|
||||||
|
;;; * eval.c (rb_eval): copy on write for argument local variable
|
||||||
|
;;; assignment.
|
||||||
|
;;;
|
||||||
|
;;; * eval.c (assign): ditto.
|
||||||
|
;;;
|
||||||
|
;;; * eval.c (rb_call0): update ruby_frame->argv with the default
|
||||||
|
;;; value used for the optional arguments.
|
||||||
|
;;;
|
||||||
|
;;; * object.c (Init_Object): "===" calls rb_obj_equal() directly.
|
||||||
|
;;; [ruby-list:39937]
|
||||||
|
;;;
|
||||||
;;; Revision 1.6 2002/09/07 14:35:46 nobu
|
;;; Revision 1.6 2002/09/07 14:35:46 nobu
|
||||||
;;; * misc/inf-ruby.el (inferior-ruby-error-regexp-alist): regexp
|
;;; * misc/inf-ruby.el (inferior-ruby-error-regexp-alist): regexp
|
||||||
;;; alist for error message from ruby.
|
;;; alist for error message from ruby.
|
||||||
|
1
object.c
1
object.c
@ -2611,6 +2611,7 @@ Init_Object()
|
|||||||
rb_define_method(rb_cSymbol, "to_s", sym_to_s, 0);
|
rb_define_method(rb_cSymbol, "to_s", sym_to_s, 0);
|
||||||
rb_define_method(rb_cSymbol, "id2name", sym_to_s, 0);
|
rb_define_method(rb_cSymbol, "id2name", sym_to_s, 0);
|
||||||
rb_define_method(rb_cSymbol, "to_sym", sym_to_sym, 0);
|
rb_define_method(rb_cSymbol, "to_sym", sym_to_sym, 0);
|
||||||
|
rb_define_method(rb_cSymbol, "===", rb_obj_equal, 1);
|
||||||
|
|
||||||
rb_define_method(rb_cModule, "freeze", rb_mod_freeze, 0);
|
rb_define_method(rb_cModule, "freeze", rb_mod_freeze, 0);
|
||||||
rb_define_method(rb_cModule, "===", rb_mod_eqq, 1);
|
rb_define_method(rb_cModule, "===", rb_mod_eqq, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user