summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authorFabio Sangiovanni <[email protected]>2025-01-29 14:57:58 +0100
committerNobuyoshi Nakada <[email protected]>2025-01-31 00:20:47 +0900
commitf0dc9dcdc7a3b15b3192b1503a3c3d9eec3ada06 ()
tree7b21c415f46540cd2c5715378d483dbbf6625645 /vm_method.c
parent50327913303d3b821720476406190cbfb6382492 (diff)
rb_alias: improve "undefined method" error message by invoking
`rb_print_undef` with `target_klass` as argument.
Notes: Merged: https://.com/ruby/ruby/pull/12665
-rw-r--r--vm_method.c2
1 files changed, 1 insertions, 1 deletions
@@ -2311,7 +2311,7 @@ rb_alias(VALUE klass, ID alias_name, ID original_name)
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, METHOD_VISI_UNDEF);
}
}