1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2015-10-27 14:14:18 +00:00
parent 6c2afd62f5
commit 6964c0635f
2 changed files with 11 additions and 2 deletions

View file

@ -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.

View file

@ -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