summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-07 14:35:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-07 14:35:19 +0000
commitb067aef7c0a26a6d689f214bff66ee318fa9ad17 (patch)
tree0176c034317d071fa80815b55f1c5087c09a888c
parent4632511aa9723ecf1de5d255f58d6537f6006438 (diff)
* eval.c (formal_assign): packed post splat arguments may conflict
with normal arguments. [ruby-core:09021] * eval.c (rb_call0): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--eval.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 40bc30a48a0..96831938826 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat Oct 7 23:33:02 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * eval.c (formal_assign): packed post splat arguments may conflict
+ with normal arguments. [ruby-core:09021]
+
+ * eval.c (rb_call0): ditto.
+
Sat Oct 7 11:53:04 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* object.c (rb_mod_initialize): since module_eval no longer passes
diff --git a/eval.c b/eval.c
index 9e788df9e18..12f852f7769 100644
--- a/eval.c
+++ b/eval.c
@@ -5678,6 +5678,7 @@ formal_assign(VALUE recv, NODE *node, int argc, const VALUE *argv, VALUE *local_
v = rb_ary_new4(argc,argv);
n += npost;
i += n*256;
+ i = -i;
}
else {
v = rb_ary_new2(0);
@@ -5719,11 +5720,13 @@ rb_call0(VALUE klass, VALUE recv, ID id, ID oid,
stack_check();
rb_gc_finalize_deferred();
}
- if (argc >= 256) {
+ if (argc < 0) {
VALUE tmp;
VALUE *nargv;
- int n = argc / 256 - 1;
+ int n;
+ argc = -argc;
+ n = argc / 256 - 1;
argc %= 256;
tmp = svalue_to_avalue(argv[argc]);
nargv = TMP_ALLOC(argc + RARRAY_LEN(tmp) + n);