mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
b2d94322e6
A couple of things worth mentioning here: - "{" is a metacharacter, should be escaped if it is meant to match a "{". The code worked, though, because the regexp engine is tolerant to this, but issued warnings. - gsub accepts a string as first argument. That's the best idiom to use when your pattern has no metacharacters, since gsub interprets the string as an exact substring to look for, rather than a regexp. The benefit is that your pattern is crystal clear and needs no backslashes. |
||
---|---|---|
.. | ||
abstract_controller | ||
action_controller | ||
action_dispatch | ||
action_pack | ||
action_view | ||
abstract_controller.rb | ||
action_controller.rb | ||
action_dispatch.rb | ||
action_pack.rb | ||
action_view.rb |