summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-25 03:51:23 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-25 03:51:23 +0000
commit7ed66b9e1da2b1a364659562ff918afbec005004 (patch)
tree74fe517ce81fe2fccac087b9970e23523517a796 /class.c
parente13f96f413dc40adaf1104decb10f80ddf636aa3 (diff)
2000-02-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/class.c b/class.c
index 19f700b..5dcdcf6 100644
--- a/class.c
+++ b/class.c
@@ -605,6 +605,8 @@ rb_scan_args(argc, argv, fmt, va_alist)
va_init_list(vargs, fmt);
+ if (*p == '*') goto rest_arg;
+
if (ISDIGIT(*p)) {
n = *p - '0';
if (n > argc)
@@ -634,6 +636,7 @@ rb_scan_args(argc, argv, fmt, va_alist)
}
if(*p == '*') {
+ rest_arg:
var = va_arg(vargs, VALUE*);
if (argc > i) {
if (var) *var = rb_ary_new4(argc-i, argv+i);