Commit f2004e2
committed
Do not cache regex after first use
The /o flag tells Ruby to only interpolate the regex once, cache the
result of that interpolation, and use it for the rest of the life of the
project. Effectively, it in-lines the result of the first time you
interpolate. This is a Bad Time™️ for us because that means we cache the
first story number we try. In most production usages this is fine b/c we
fire up the Ruby process and only check a single time. But that's not
true for tests, so depending on the order tests are run, they could
start breaking!
No more!1 parent 268a825 commit f2004e2
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments