summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-31 21:55:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-31 21:55:53 +0000
commit70d34c623a4a35f15936b7b7fecd618aeb0521d3 (patch)
tree177c72272c323023f899d7205f13cf0ae51a310b /parse.y
parentbcd25152a6352eb9952cf4620b2fe4c32fa6508d (diff)
parse.y: no duplicate attrset ID
* parse.y (intern_str): dynamic attrset ID is registered by `rb_id_attrset()` already, so no further registration is needed. [ruby-core:62861] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index a4480b15c7..4ee2b49392 100644
--- a/parse.y
+++ b/parse.y
@@ -10657,7 +10657,9 @@ next_id(VALUE str)
static ID
intern_str(VALUE str)
{
- return register_static_symid_str(next_id(str), str);
+ ID id = next_id(str);
+ if (ID_DYNAMIC_SYM_P(id) && is_attrset_id(id)) return id;
+ return register_static_symid_str(id, str);
}
ID