diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-04 14:21:57 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-04 14:21:57 +0000 |
commit | 6322c6239f8718af0bf5b424bd975f5070121973 (patch) | |
tree | 3b9916f5a4c9f66a468fae03b67671812009af28 | |
parent | d1553ff518b9e183445bcac06c2e540c757db9fe (diff) | |
download | ruby-6322c6239f8718af0bf5b424bd975f5070121973.tar.gz |
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
-rw-r--r-- | compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |