mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
185c4f2d11
Before this commit we initialized all Symbols with the default regexp, then later on reassigned any symbols descending from stars with either their regexp from `@requirements` or the default greedy regexp. With this commit we initialize all Symbols descending from Stars with the greedy regexp at parse time. This allows us to get rid of the star branch in path/pattern, since any regexps from `@requirements` will already have been set in the symbol branch of this code. This is essentially an alternate version of #38901. Getting rid of the extra branch makes some performance work I am doing a bit easier, plus it saves us a few method calls. Also the constant saves us from creating the same regexp multiple times, and it is nice to give that regexp a name. |
||
---|---|---|
.. | ||
node.rb |