diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-25 04:05:51 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-25 04:05:51 +0000 |
| commit | e3b6e1dc700e1135b62aa77b51755ac94de7a2c3 (patch) | |
| tree | 57934c682b6023658d90044021e559a73bd90ee5 | |
| parent | f9b25f26f7772bc197ecdae084eded25c639da83 (diff) | |
| download | ruby-e3b6e1dc700e1135b62aa77b51755ac94de7a2c3.tar.gz ruby-e3b6e1dc700e1135b62aa77b51755ac94de7a2c3.tar.xz ruby-e3b6e1dc700e1135b62aa77b51755ac94de7a2c3.zip | |
* proc.c (missing_wrap): new_arg is already given if argc > 1.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | proc.c | 5 |
2 files changed, 5 insertions, 4 deletions
@@ -1,4 +1,6 @@ -Fri Sep 25 13:04:46 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> +Fri Sep 25 13:05:50 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * proc.c (missing_wrap): new_arg is already given if argc > 1. * proc.c (mnew): fix for instance method of Module, BasicObjec and subclass of a class which overrides respond_to_missing?. @@ -884,13 +884,12 @@ rb_obj_is_method(VALUE m) } static VALUE -missing_wrap(VALUE dummy, VALUE args, int argc, VALUE *argv) +missing_wrap(VALUE new_args, VALUE args, int argc, VALUE *argv) { - VALUE new_args = rb_ary_new4(argc, argv); VALUE obj = RARRAY_PTR(args)[0]; VALUE sym = RARRAY_PTR(args)[1]; - + if (argc <= 1) new_args = rb_ary_new4(argc, argv); rb_ary_unshift(new_args, sym); return rb_funcall2(obj, rb_intern("method_missing"), check_argc(RARRAY_LEN(new_args)), RARRAY_PTR(new_args)); |
