summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-24 02:04:29 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-24 02:04:29 +0000
commit91c6d41ac34d5a1d9ce3f82be4d0b8537de0ee45 (patch)
tree8e0cd381eb0cb23e2b35fb84ee66057a7d9b01ba /parse.y
parent8c3b01022b932e57800419abb5ed0056e8120399 (diff)
parse.y: trivial optimization
* parse.y (rb_str_dynamic_intern): branch by same condition as rb_id2sym to reduce unnecessary branch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index aa52183ea7..48b6ea1403 100644
--- a/parse.y
+++ b/parse.y
@@ -10715,7 +10715,7 @@ rb_str_dynamic_intern(VALUE str)
if (st_lookup(global_symbols.sym_id, str, &id)) {
VALUE sym = ID2SYM(id);
- if (!STATIC_SYM_P(sym)) {
+ if (ID_DYNAMIC_SYM_P(id)) {
/* because of lazy sweep, dynamic symbol may be unmarked already and swept
* at next time */
rb_gc_resurrect(sym);