Skip to content

Commit 779b788

Browse files
committed
Revert use of match?. It was introduced on Ruby 2.4 and we keep compatibility with old versions
1 parent cf3ba98 commit 779b788

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/onelogin/ruby-saml/saml_message.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def encode(string)
136136
# @return [true, false] whether or not the string is base64 encoded
137137
#
138138
def base64_encoded?(string)
139-
string.gsub(/\s|\\r|\\n/, '').match?(BASE64_FORMAT)
139+
!!string.gsub(/[\r\n]|\\r|\\n|\s/, "").match(BASE64_FORMAT)
140140
end
141141

142142
# Attempt inflating a string, if it fails, return the original string.

0 commit comments

Comments
 (0)