From 8f2b1b67eafe193013fcac973363e50d666a5a5e Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 4 Mar 2017 14:21:57 +0000 Subject: 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 --- compile.c | 4 ++-- 1 file 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; -- cgit v1.2.3