Skip to content

Commit

Permalink
Fix #573. Replace method_exists? by respond_to?
Browse files Browse the repository at this point in the history
  • Loading branch information
pitbulk committed Apr 5, 2021
1 parent b40edbf commit 455c2f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/onelogin/ruby-saml/attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def ==(other)
def fetch(name)
attributes.each_key do |attribute_key|
if name.is_a?(Regexp)
if name.method_exists? :match?
if name.respond_to? :match?
return self[attribute_key] if name.match?(attribute_key)
else
return self[attribute_key] if name.match(attribute_key)
Expand Down

0 comments on commit 455c2f5

Please sign in to comment.