diff options
author | Xavier Noria <fxn@hashref.com> | 2019-02-28 14:00:34 -0800 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2019-02-28 14:08:54 -0800 |
commit | 42ca13a9947a57e37b0498bc96da2b66ec14864e (patch) | |
tree | 494e60eb3b6c7833eb04e9d03a3dee713a761ebb /activerecord/test/cases/base_test.rb | |
parent | 81710da41c2efac1d04868579d0b71f578f3f539 (diff) | |
download | rails-42ca13a9947a57e37b0498bc96da2b66ec14864e.tar.gz rails-42ca13a9947a57e37b0498bc96da2b66ec14864e.tar.bz2 rails-42ca13a9947a57e37b0498bc96da2b66ec14864e.zip |
Removes unnecessary dot in regexp
A string S matches ([.]|\b)html if an only if matches \bhtml:
* If S matches [.]html, then it matches \bhtml.
* If S matches \bhtml, then it matches \bhtml.
Reciprocally:
* If S matches \bhtml, then it matches ([.]|\b)html.
The character class can be removed, and since we are on it we remove the
group too so that it is clear to a reader of the code that there is no
grouping going on.
References #35166.
Diffstat (limited to 'activerecord/test/cases/base_test.rb')
0 files changed, 0 insertions, 0 deletions