mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 08:17:24 +08:00
DEV: Prefer \A and \z over ^ and $ in regexes (#19936)
This commit is contained in:

committed by
GitHub

parent
f7907a3645
commit
666536cbd1
@ -276,7 +276,7 @@ class DiscourseRedis
|
||||
def eval(redis, *args, **kwargs)
|
||||
redis.evalsha @sha1, *args, **kwargs
|
||||
rescue ::Redis::CommandError => e
|
||||
if e.to_s =~ /^NOSCRIPT/
|
||||
if e.to_s =~ /\ANOSCRIPT/
|
||||
redis.eval @script, *args, **kwargs
|
||||
else
|
||||
raise
|
||||
|
Reference in New Issue
Block a user