Skip to content

Commit ae08faf

Browse files
committed
Rubocop: resolve Style/RedundantRegexpArgument
1 parent 12728ae commit ae08faf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/webmachine/quoted_string.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def quote(str)
2828

2929
# Escapes quotes within a quoted string.
3030
def escape_quotes(str)
31-
str.gsub(/"/, '\\"')
31+
str.gsub('"', '\\"')
3232
end
3333

3434
# Unescapes quotes within a quoted string

lib/webmachine/resource/authentication.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module Authentication
2424
# @yieldparam [String] password the passed password
2525
# @yieldreturn [true,false] whether the username/password is correct
2626
def basic_auth(header, realm = 'Webmachine')
27-
if header =~ BASIC_HEADER && yield(*$1.unpack1('m*').split(/:/, 2))
27+
if header =~ BASIC_HEADER && yield(*$1.unpack1('m*').split(':', 2))
2828
true
2929
else
3030
%(Basic realm="#{realm}")

0 commit comments

Comments
 (0)