summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/iseq.c b/iseq.c
index 48a4d4b677..6c2d2256ff 100644
--- a/iseq.c
+++ b/iseq.c
@@ -1830,13 +1830,20 @@ rb_insn_operand_intern(const rb_iseq_t *iseq,
case TS_NUM: /* ULONG */
if (insn == BIN(defined) && op_no == 0) {
enum defined_type deftype = (enum defined_type)op;
- if (deftype == DEFINED_FUNC) {
- ret = rb_fstring_lit("func"); break;
- }
- if (deftype == DEFINED_REF) {
- ret = rb_fstring_lit("ref"); break;
+ switch (deftype) {
+ case DEFINED_FUNC:
+ ret = rb_fstring_lit("func");
+ break;
+ case DEFINED_REF:
+ ret = rb_fstring_lit("ref");
+ break;
+ case DEFINED_CONST_FROM:
+ ret = rb_fstring_lit("constant-from");
+ break;
+ default:
+ ret = rb_iseq_defined_string(deftype);
+ break;
}
- ret = rb_iseq_defined_string(deftype);
if (ret) break;
}
else if (insn == BIN(checktype) && op_no == 0) {