* proc.c (mnew_missing): Remove an unused argument.

After r51126 rid is not used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yui-knk 2016-08-18 15:59:12 +00:00
Родитель 2edcca66e3
Коммит c4d4abf241
2 изменённых файлов: 9 добавлений и 5 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Fri Aug 19 01:00:53 2016 Yuichiro Kaneko <yui-knk@ruby-lang.org>
* proc.c (mnew_missing): Remove an unused argument.
After r51126 rid is not used.
Thu Aug 18 09:26:52 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org> Thu Aug 18 09:26:52 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
* gems/bundled_gems: bump to test-unit-3.2.1 * gems/bundled_gems: bump to test-unit-3.2.1

9
proc.c
Просмотреть файл

@ -1323,7 +1323,7 @@ respond_to_missing_p(VALUE klass, VALUE obj, VALUE sym, int scope)
static VALUE static VALUE
mnew_missing(VALUE klass, VALUE obj, ID id, ID rid, VALUE mclass) mnew_missing(VALUE klass, VALUE obj, ID id, VALUE mclass)
{ {
struct METHOD *data; struct METHOD *data;
VALUE method = TypedData_Make_Struct(mclass, struct METHOD, &method_data_type, data); VALUE method = TypedData_Make_Struct(mclass, struct METHOD, &method_data_type, data);
@ -1352,13 +1352,12 @@ mnew_internal(const rb_method_entry_t *me, VALUE klass,
{ {
struct METHOD *data; struct METHOD *data;
VALUE method; VALUE method;
ID rid = id;
rb_method_visibility_t visi = METHOD_VISI_UNDEF; rb_method_visibility_t visi = METHOD_VISI_UNDEF;
again: again:
if (UNDEFINED_METHOD_ENTRY_P(me)) { if (UNDEFINED_METHOD_ENTRY_P(me)) {
if (respond_to_missing_p(klass, obj, ID2SYM(id), scope)) { if (respond_to_missing_p(klass, obj, ID2SYM(id), scope)) {
return mnew_missing(klass, obj, id, rid, mclass); return mnew_missing(klass, obj, id, mclass);
} }
if (!error) return Qnil; if (!error) return Qnil;
rb_print_undef(klass, id, METHOD_VISI_UNDEF); rb_print_undef(klass, id, METHOD_VISI_UNDEF);
@ -1639,7 +1638,7 @@ obj_method(VALUE obj, VALUE vid, int scope)
if (!id) { if (!id) {
if (respond_to_missing_p(klass, obj, vid, scope)) { if (respond_to_missing_p(klass, obj, vid, scope)) {
id = rb_intern_str(vid); id = rb_intern_str(vid);
return mnew_missing(klass, obj, id, id, mclass); return mnew_missing(klass, obj, id, mclass);
} }
rb_method_name_error(klass, vid); rb_method_name_error(klass, vid);
} }
@ -1728,7 +1727,7 @@ rb_obj_singleton_method(VALUE obj, VALUE vid)
if (!NIL_P(klass = rb_singleton_class_get(obj)) && if (!NIL_P(klass = rb_singleton_class_get(obj)) &&
respond_to_missing_p(klass, obj, vid, FALSE)) { respond_to_missing_p(klass, obj, vid, FALSE)) {
id = rb_intern_str(vid); id = rb_intern_str(vid);
return mnew_missing(klass, obj, id, id, rb_cMethod); return mnew_missing(klass, obj, id, rb_cMethod);
} }
undef: undef:
rb_name_err_raise("undefined singleton method `%1$s' for `%2$s'", rb_name_err_raise("undefined singleton method `%1$s' for `%2$s'",