diff options
author | Aaron Patterson <[email protected]> | 2021-03-16 15:12:37 -0700 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2021-03-17 10:55:37 -0700 |
commit | 17bf478de14d0dd9098df65282f7f419cd792599 (patch) | |
tree | 3198984fbd2d003fdf4d6b80837d97619561c903 /iseq.c | |
parent | 366e88e508de7c59d69906ad948cccd7979e932b (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |