diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-30 15:25:46 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-30 15:25:46 +0000 |
commit | fba47c139755b1004301d5dcf44c77b3bc3f111e (patch) | |
tree | 5f71047fde9ea1fff399f704528ef035e7498c01 /parse.y | |
parent | 58fdffaa13e56de774ef033daa1464564622f7b1 (diff) | |
download | ruby-fba47c139755b1004301d5dcf44c77b3bc3f111e.tar.gz |
parse.y: raise with numeric ID type
* parse.y (rb_id_attrset): all valid ID types are handled
properly, raise with numeric ID type which may be broken for
GCed static symbol.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -8815,17 +8815,6 @@ block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2) } } -static const char id_type_names[][9] = { - "LOCAL", - "INSTANCE", - "", /* INSTANCE2 */ - "GLOBAL", - "ATTRSET", - "CONST", - "CLASS", - "JUNK", -}; - static ID rb_pin_dynamic_symbol(VALUE); static ID attrsetname_to_attr(VALUE name); @@ -8849,9 +8838,8 @@ rb_id_attrset(ID id) case ID_ATTRSET: return id; default: - rb_name_error(id, "cannot make %s ID :%"PRIsVALUE" attrset", - id_type_names[scope], rb_id2str(id)); - + rb_name_error(id, "cannot make unknown type ID %d:%p attrset", + scope, (void *)id); } } if (id&ID_STATIC_SYM) { |