summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorShugo Maeda <shugo@ruby-lang.org>2021-12-06 09:40:54 +0900
committerShugo Maeda <shugo@ruby-lang.org>2021-12-06 09:40:54 +0900
commitc2192cb985c10c90ba5e4d64652f79f89afff983 (patch)
treea4bb65b87a57b1019884b1b9a2ef6bd61e7e6a2d /eval.c
parente713552868c05fe77a2e3acb825460e5c2bdb53f (diff)
Clarify the error message when trying to import C methods [Bug #18385]
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 1cc699445f..1424139710 100644
--- a/eval.c
+++ b/eval.c
@@ -1526,7 +1526,7 @@ refinement_import_methods_i(ID key, VALUE value, void *data)
struct refinement_import_methods_arg *arg = (struct refinement_import_methods_arg *)data;
if (me->def->type != VM_METHOD_TYPE_ISEQ) {
- rb_raise(rb_eArgError, "Can't import method: %"PRIsVALUE"#%"PRIsVALUE, rb_class_path(arg->module), rb_id2str(key));
+ rb_raise(rb_eArgError, "Can't import method which is not defined with Ruby code: %"PRIsVALUE"#%"PRIsVALUE, rb_class_path(arg->module), rb_id2str(key));
}
rb_cref_t *new_cref = rb_vm_cref_dup_without_refinements(me->def->body.iseq.cref);
CREF_REFINEMENTS_SET(new_cref, CREF_REFINEMENTS(arg->cref));