diff options
author | Xavier Noria <fxn@hashref.com> | 2016-04-21 21:59:23 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-04-21 21:59:50 +0200 |
commit | 9311afcbe882497921bd7e20add6864f1a3f43ee (patch) | |
tree | 7518fa0f3d80f47f4d2e760da35371c4a4b8bfca /activesupport/lib/active_support | |
parent | 5d4a023cdbfe005f83a4d83944af7dbf677b1f99 (diff) | |
download | rails-9311afcbe882497921bd7e20add6864f1a3f43ee.tar.gz rails-9311afcbe882497921bd7e20add6864f1a3f43ee.tar.bz2 rails-9311afcbe882497921bd7e20add6864f1a3f43ee.zip |
just say nothing about why this regexp is slower [ci skip]
Further investigation seems to disprove that backtracking is the
reason why the positive variant is slower, see
https://github.com/rails/rails/pull/24658#issuecomment-213079710
so, just say nothing about it, only assert it is slower.
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/blank.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/blank.rb b/activesupport/lib/active_support/core_ext/object/blank.rb index d6bad98376..b08321aeeb 100644 --- a/activesupport/lib/active_support/core_ext/object/blank.rb +++ b/activesupport/lib/active_support/core_ext/object/blank.rb @@ -115,7 +115,7 @@ class String # fallback. Penalty for the rest of strings is marginal. # # Double negation in the second operand is also a performance tweak, it is - # faster than the positive \A[[:space:]]*\z due to lack of backtracking. + # faster than the positive \A[[:space:]]*\z. empty? || !(/[[:^space:]]/ === self) end end |