From dc2e17f8d78eec77ebff70cdb51e93f4990e99da Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Mon, 9 Mar 2020 13:20:12 +0100 Subject: [PATCH 1/2] WIP --- error.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/error.c b/error.c index b9ec8427e65214..f348968f22c384 100644 --- a/error.c +++ b/error.c @@ -910,9 +910,13 @@ rb_check_typeddata(VALUE obj, const rb_data_type_t *data_type) wrong_type: etype = builtin_class_name(obj); if (!etype) + printf("wrong argument type %"PRIsVALUE" (expected %s)", + rb_obj_class(obj), data_type->wrap_struct_name); rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE" (expected %s)", rb_obj_class(obj), data_type->wrap_struct_name); wrong_datatype: + printf("wrong argument type %s (expected %s)", + etype, data_type->wrap_struct_name); rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)", etype, data_type->wrap_struct_name); } From ed21047dfa4f7f3d3da5a1e6313b6ea9f000c3a9 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Mon, 9 Mar 2020 13:35:55 +0100 Subject: [PATCH 2/2] WIP --- error.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/error.c b/error.c index f348968f22c384..5cb57057bced36 100644 --- a/error.c +++ b/error.c @@ -910,12 +910,12 @@ rb_check_typeddata(VALUE obj, const rb_data_type_t *data_type) wrong_type: etype = builtin_class_name(obj); if (!etype) - printf("wrong argument type %"PRIsVALUE" (expected %s)", + printf("wrong_type: wrong argument type %"PRIsVALUE" (expected %s)", rb_obj_class(obj), data_type->wrap_struct_name); rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE" (expected %s)", rb_obj_class(obj), data_type->wrap_struct_name); wrong_datatype: - printf("wrong argument type %s (expected %s)", + printf("wrong_datatype: wrong argument type %s (expected %s)", etype, data_type->wrap_struct_name); rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)", etype, data_type->wrap_struct_name);