aboutsummaryrefslogtreecommitdiffstats
path: root/defs
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-27 14:14:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-27 14:14:18 +0000
commit6964c0635f76ea79a49c8dcb85f279e0b85fc0cd (patch)
treeabb14cbaadba4f63d97a86919a83bcf83fa9e5a5 /defs
parent6c2afd62f59dfa277ef2b42d3c6b21e05cc41b04 (diff)
downloadruby-6964c0635f76ea79a49c8dcb85f279e0b85fc0cd.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')
-rw-r--r--defs/id.def8
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