mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
4 changed files with 33 additions and 7 deletions
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>
|
||||
|
||||
* 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_heap();
|
||||
PUSH_SCOPE();
|
||||
ruby_scope->local_vars = 0;
|
||||
ruby_scope->local_tbl = 0;
|
||||
top_scope = ruby_scope;
|
||||
/* default visibility is private at toplevel */
|
||||
SCOPE_SET(SCOPE_PRIVATE);
|
||||
|
@ -3392,6 +3390,7 @@ rb_eval(self, n)
|
|||
if (ruby_scope->local_vars == 0)
|
||||
rb_bug("unexpected local variable assignment");
|
||||
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;
|
||||
break;
|
||||
|
||||
|
@ -4954,6 +4953,7 @@ assign(self, lhs, val, pcall)
|
|||
case NODE_LASGN:
|
||||
if (ruby_scope->local_vars == 0)
|
||||
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;
|
||||
break;
|
||||
|
||||
|
@ -5617,7 +5617,7 @@ rb_call0(klass, recv, id, oid, argc, argv, body, nosuper)
|
|||
if (local_vars) {
|
||||
if (i > 0) {
|
||||
/* +2 for $_ and $~ */
|
||||
MEMCPY(local_vars+2, argv, VALUE, i);
|
||||
MEMCPY(local_vars+2, argv, VALUE, ruby_frame->argc);
|
||||
}
|
||||
argv += i; argc -= i;
|
||||
if (node->nd_opt) {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
;;; (setq interpreter-mode-alist (append '(("ruby" . ruby-mode))
|
||||
;;; 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"
|
||||
;;; "Run an inferior Ruby process")
|
||||
|
@ -35,16 +35,28 @@
|
|||
;;; HISTORY
|
||||
;;; senda - 8 Apr 1998: Created.
|
||||
;;; $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
|
||||
;;; * misc/inf-ruby.el (inferior-ruby-error-regexp-alist): regexp
|
||||
;;; alist for error message from ruby.
|
||||
;;;
|
||||
;;;
|
||||
;;; * misc/inf-ruby.el (inferior-ruby-mode): fixed for Emacs.
|
||||
;;;
|
||||
;;;
|
||||
;;; * misc/inf-ruby.el (ruby-send-region): compilation-parse-errors
|
||||
;;; doesn't parse first line, so insert separators before each
|
||||
;;; evaluations.
|
||||
;;;
|
||||
;;;
|
||||
;;; Revision 1.5 2002/08/19 10:05:47 nobu
|
||||
;;; * misc/inf-ruby.el (inf-ruby-keys): ruby-send-definition
|
||||
;;; conflicted with ruby-insert-end.
|
||||
|
|
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, "id2name", sym_to_s, 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, "===", rb_mod_eqq, 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue