summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2021-03-16 15:12:37 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2021-03-17 10:55:37 -0700
commit17bf478de14d0dd9098df65282f7f419cd792599 (patch)
tree3198984fbd2d003fdf4d6b80837d97619561c903 /iseq.c
parent366e88e508de7c59d69906ad948cccd7979e932b (diff)
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
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4279
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c2
1 files changed, 1 insertions, 1 deletions
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;