summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-04 14:21:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-04 14:21:57 +0000
commit8f2b1b67eafe193013fcac973363e50d666a5a5e (patch)
tree3b9916f5a4c9f66a468fae03b67671812009af28 /compile.c
parentb4baeb5af656d7a5999f867760e2db6b7fa7aa2e (diff)
compile.c: fix invalid label message
* compile.c (validate_label): fix invalid label message. registered labels are Symbols, not IDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index 68aeb4cfce..5d838b7ac7 100644
--- a/compile.c
+++ b/compile.c
@@ -559,7 +559,7 @@ validate_label(st_data_t name, st_data_t label, st_data_t arg)
do {
COMPILE_ERROR(iseq, lobj->position,
"%"PRIsVALUE": undefined label",
- rb_id2str((ID)name));
+ rb_sym2str((VALUE)name));
} while (0);
}
return ST_CONTINUE;
@@ -5268,7 +5268,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, NODE *node, int poppe
if (nd_type(node->nd_args->nd_head) == NODE_LIT &&
SYMBOL_P(node->nd_args->nd_head->nd_lit)) {
- label_name = SYM2ID(node->nd_args->nd_head->nd_lit);
+ label_name = node->nd_args->nd_head->nd_lit;
if (!st_lookup(labels_table, (st_data_t)label_name, &data)) {
label = NEW_LABEL(line);
label->position = line;