Skip to content

Commit eb440db

Browse files
committed
Add rb_raise call
1 parent 0e8c41d commit eb440db

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ext/rbs_extension/ast_translation.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,4 +1146,6 @@ VALUE rbs_struct_to_ruby_value(rbs_translation_context_t ctx, rbs_node_t *instan
11461146
return ID2SYM(rb_intern3((const char *) constant->start, constant->length, ctx.encoding));
11471147
}
11481148
}
1149+
1150+
rb_raise(rb_eRuntimeError, "Unknown node type: %d", instance->type);
11491151
}

templates/ext/rbs_extension/ast_translation.c.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,6 @@ VALUE rbs_struct_to_ruby_value(rbs_translation_context_t ctx, rbs_node_t *instan
183183
return ID2SYM(rb_intern3((const char *) constant->start, constant->length, ctx.encoding));
184184
}
185185
}
186+
187+
rb_raise(rb_eRuntimeError, "Unknown node type: %d", instance->type);
186188
}

0 commit comments

Comments
 (0)