diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-27 14:14:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-27 14:14:18 +0000 |
commit | 982a9f41d7b73e12002703c7ee490936a406c9c2 (patch) | |
tree | abb14cbaadba4f63d97a86919a83bcf83fa9e5a5 /defs/id.def | |
parent | faa6bfbc9a27b40add07e632e7f9e4f5a344e8d2 (diff) | |
download | ruby-982a9f41d7b73e12002703c7ee490936a406c9c2.tar.gz |
id.def: anonymous IDs
* defs/id.def: enable anonymous IDs not to expose internal IDs for
frozen-string-literal-debug by Marshal.dump.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'defs/id.def')
-rw-r--r-- | defs/id.def | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/defs/id.def b/defs/id.def index b63d1289b4..f79e5ef4cf 100644 --- a/defs/id.def +++ b/defs/id.def @@ -61,8 +61,8 @@ firstline, predefined = __LINE__+1, %[\ core#hash_merge_ptr core#hash_merge_kwd - debug#created_path - debug#created_line + - debug#created_path + - debug#created_line ] class KeywordError < RuntimeError @@ -95,6 +95,10 @@ predefined.split(/^/).each_with_index do |line, num| token.sub!(/\A@/, "_I_") token.gsub!(/\W+/, "") end + if name == '-' + preserved_ids << token + next + end if prev = names[name] KeywordError.raise("#{name} is already registered at line #{prev+firstline}", firstline+num) end |