diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-24 02:04:29 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-24 02:04:29 +0000 |
commit | 91c6d41ac34d5a1d9ce3f82be4d0b8537de0ee45 (patch) | |
tree | 8e0cd381eb0cb23e2b35fb84ee66057a7d9b01ba | |
parent | 8c3b01022b932e57800419abb5ed0056e8120399 (diff) | |
download | ruby-91c6d41ac34d5a1d9ce3f82be4d0b8537de0ee45.tar.gz |
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
-rw-r--r-- | parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |