From 17bf478de14d0dd9098df65282f7f419cd792599 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 16 Mar 2021 15:12:37 -0700 Subject: Store strings for `defined` in the iseqs We can know the string used for "defined" calls at compile time, then store the string in the instruction sequences --- iseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iseq.c') diff --git a/iseq.c b/iseq.c index 2d83bc3f06..f696df9e71 100644 --- a/iseq.c +++ b/iseq.c @@ -3105,7 +3105,7 @@ rb_iseq_defined_string(enum defined_type type) const char *estr; VALUE *defs, str; - if ((unsigned)(type - 1) >= (unsigned)numberof(expr_names)) return 0; + if ((unsigned)(type - 1) >= (unsigned)numberof(expr_names)) rb_bug("unknown defined type %d", type); estr = expr_names[type - 1]; if (!estr[0]) return 0; defs = GET_VM()->defined_strings; -- cgit v1.2.3