Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions error.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_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_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);
}
Expand Down