ruby-changes:41344
From: yui-knk <ko1@a...>
Date: Sun, 3 Jan 2016 13:59:47 +0900 (JST)
Subject: [ruby-changes:41344] yui-knk:r53416 (trunk): Use `rb_method_visibility_t` instead of `int` in `rb_print_undef`
yui-knk 2016-01-03 13:59:54 +0900 (Sun, 03 Jan 2016) New Revision: 53416 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53416 Log: Use `rb_method_visibility_t` instead of `int` in `rb_print_undef` * eval_error.c (rb_print_undef): Use `rb_method_visibility_t` instead of `int`. * eval_intern.h (rb_print_undef): ditto * proc.c (mnew_internal): ditto * vm_method.c (rb_export_method): ditto [Misc #11649] [ruby-core:71311] [fix GH-1078] Modified files: trunk/ChangeLog trunk/eval_error.c trunk/eval_intern.h trunk/proc.c trunk/vm_method.c Index: proc.c =================================================================== --- proc.c (revision 53415) +++ proc.c (revision 53416) @@ -1272,7 +1272,7 @@ mnew_internal(const rb_method_entry_t *m https://github.com/ruby/ruby/blob/trunk/proc.c#L1272 return mnew_missing(klass, obj, id, rid, mclass); } if (!error) return Qnil; - rb_print_undef(klass, id, 0); + rb_print_undef(klass, id, METHOD_VISI_UNDEF); } if (visi == METHOD_VISI_UNDEF) { visi = METHOD_ENTRY_VISI(me); Index: vm_method.c =================================================================== --- vm_method.c (revision 53415) +++ vm_method.c (revision 53416) @@ -1036,7 +1036,7 @@ rb_export_method(VALUE klass, ID name, r https://github.com/ruby/ruby/blob/trunk/vm_method.c#L1036 if (UNDEFINED_METHOD_ENTRY_P(me) || UNDEFINED_REFINED_METHOD_P(me->def)) { - rb_print_undef(klass, name, 0); + rb_print_undef(klass, name, METHOD_VISI_UNDEF); } if (METHOD_ENTRY_VISI(me) != visi) { @@ -1538,7 +1538,7 @@ rb_alias(VALUE klass, ID alias_name, ID https://github.com/ruby/ruby/blob/trunk/vm_method.c#L1538 if ((!RB_TYPE_P(klass, T_MODULE)) || (orig_me = search_method(rb_cObject, original_name, &defined_class), UNDEFINED_METHOD_ENTRY_P(orig_me))) { - rb_print_undef(klass, original_name, 0); + rb_print_undef(klass, original_name, METHOD_VISI_UNDEF); } } @@ -1842,7 +1842,7 @@ rb_mod_modfunc(int argc, VALUE *argv, VA https://github.com/ruby/ruby/blob/trunk/vm_method.c#L1842 me = search_method(rb_cObject, id, 0); } if (UNDEFINED_METHOD_ENTRY_P(me)) { - rb_print_undef(module, id, 0); + rb_print_undef(module, id, METHOD_VISI_UNDEF); } if (me->def->type != VM_METHOD_TYPE_ZSUPER) { break; /* normal case: need not to follow 'super' link */ Index: eval_error.c =================================================================== --- eval_error.c (revision 53415) +++ eval_error.c (revision 53416) @@ -215,7 +215,7 @@ ruby_error_print(void) https://github.com/ruby/ruby/blob/trunk/eval_error.c#L215 undef_mesg_for(v, "class")) void -rb_print_undef(VALUE klass, ID id, int visi) +rb_print_undef(VALUE klass, ID id, rb_method_visibility_t visi) { const int is_mod = RB_TYPE_P(klass, T_MODULE); VALUE mesg; Index: eval_intern.h =================================================================== --- eval_intern.h (revision 53415) +++ eval_intern.h (revision 53416) @@ -264,7 +264,7 @@ NORETURN(void rb_method_name_error(VALUE https://github.com/ruby/ruby/blob/trunk/eval_intern.h#L264 NORETURN(void rb_fiber_start(void)); -NORETURN(void rb_print_undef(VALUE, ID, int)); +NORETURN(void rb_print_undef(VALUE, ID, rb_method_visibility_t)); NORETURN(void rb_print_undef_str(VALUE, VALUE)); NORETURN(void rb_print_inaccessible(VALUE, ID, rb_method_visibility_t)); NORETURN(void rb_vm_localjump_error(const char *,VALUE, int)); Index: ChangeLog =================================================================== --- ChangeLog (revision 53415) +++ ChangeLog (revision 53416) @@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Jan 3 13:56:49 2016 Yuichiro Kaneko <yui-knk@r...> + + * eval_error.c (rb_print_undef): Use `rb_method_visibility_t` + instead of `int`. + * eval_intern.h (rb_print_undef): ditto + * proc.c (mnew_internal): ditto + * vm_method.c (rb_export_method): ditto + [Misc #11649] [ruby-core:71311] [fix GH-1078] + Sun Jan 3 12:12:09 2016 Nobuyoshi Nakada <nobu@r...> * acinclude.m4: rename aclocal.m4, which should be generated by -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/