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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
21649a0fcc
commit
5cf9b65aa3
@ -1,3 +1,12 @@
|
|||||||
|
Sun Jan 3 13:56:49 2016 Yuichiro Kaneko <yui-knk@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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@ruby-lang.org>
|
Sun Jan 3 12:12:09 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* acinclude.m4: rename aclocal.m4, which should be generated by
|
* acinclude.m4: rename aclocal.m4, which should be generated by
|
||||||
|
@ -215,7 +215,7 @@ ruby_error_print(void)
|
|||||||
undef_mesg_for(v, "class"))
|
undef_mesg_for(v, "class"))
|
||||||
|
|
||||||
void
|
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);
|
const int is_mod = RB_TYPE_P(klass, T_MODULE);
|
||||||
VALUE mesg;
|
VALUE mesg;
|
||||||
|
@ -264,7 +264,7 @@ NORETURN(void rb_method_name_error(VALUE, VALUE));
|
|||||||
|
|
||||||
NORETURN(void rb_fiber_start(void));
|
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_undef_str(VALUE, VALUE));
|
||||||
NORETURN(void rb_print_inaccessible(VALUE, ID, rb_method_visibility_t));
|
NORETURN(void rb_print_inaccessible(VALUE, ID, rb_method_visibility_t));
|
||||||
NORETURN(void rb_vm_localjump_error(const char *,VALUE, int));
|
NORETURN(void rb_vm_localjump_error(const char *,VALUE, int));
|
||||||
|
2
proc.c
2
proc.c
@ -1272,7 +1272,7 @@ mnew_internal(const rb_method_entry_t *me, VALUE klass,
|
|||||||
return mnew_missing(klass, obj, id, rid, mclass);
|
return mnew_missing(klass, obj, id, rid, mclass);
|
||||||
}
|
}
|
||||||
if (!error) return Qnil;
|
if (!error) return Qnil;
|
||||||
rb_print_undef(klass, id, 0);
|
rb_print_undef(klass, id, METHOD_VISI_UNDEF);
|
||||||
}
|
}
|
||||||
if (visi == METHOD_VISI_UNDEF) {
|
if (visi == METHOD_VISI_UNDEF) {
|
||||||
visi = METHOD_ENTRY_VISI(me);
|
visi = METHOD_ENTRY_VISI(me);
|
||||||
|
@ -1036,7 +1036,7 @@ rb_export_method(VALUE klass, ID name, rb_method_visibility_t visi)
|
|||||||
|
|
||||||
if (UNDEFINED_METHOD_ENTRY_P(me) ||
|
if (UNDEFINED_METHOD_ENTRY_P(me) ||
|
||||||
UNDEFINED_REFINED_METHOD_P(me->def)) {
|
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) {
|
if (METHOD_ENTRY_VISI(me) != visi) {
|
||||||
@ -1538,7 +1538,7 @@ rb_alias(VALUE klass, ID alias_name, ID original_name)
|
|||||||
if ((!RB_TYPE_P(klass, T_MODULE)) ||
|
if ((!RB_TYPE_P(klass, T_MODULE)) ||
|
||||||
(orig_me = search_method(rb_cObject, original_name, &defined_class),
|
(orig_me = search_method(rb_cObject, original_name, &defined_class),
|
||||||
UNDEFINED_METHOD_ENTRY_P(orig_me))) {
|
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, VALUE module)
|
|||||||
me = search_method(rb_cObject, id, 0);
|
me = search_method(rb_cObject, id, 0);
|
||||||
}
|
}
|
||||||
if (UNDEFINED_METHOD_ENTRY_P(me)) {
|
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) {
|
if (me->def->type != VM_METHOD_TYPE_ZSUPER) {
|
||||||
break; /* normal case: need not to follow 'super' link */
|
break; /* normal case: need not to follow 'super' link */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user