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 | 6964c0635f76ea79a49c8dcb85f279e0b85fc0cd (patch) | |
tree | abb14cbaadba4f63d97a86919a83bcf83fa9e5a5 | |
parent | 6c2afd62f59dfa277ef2b42d3c6b21e05cc41b04 (diff) |
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | defs/id.def | 8 |
2 files changed, 11 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Tue Oct 27 23:14:14 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * defs/id.def: enable anonymous IDs not to expose internal IDs for + frozen-string-literal-debug by Marshal.dump. + Tue Oct 27 17:06:55 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> * defs/id.def: move internal IDs for frozen-string-literal-debug. 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 |