mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Use Ruby 2.x compatible rescue clauses
Ruby 2.x doesn't support non-class/module arguments to rescue clauses. Ruby 1.9 only supported it due to what is now considered a regression: https://bugs.ruby-lang.org/issues/4438 Remove string arguments from rescue clauses to prevent TypeErrors from being raised during rescue attempts.
This commit is contained in:
parent
59f751f1c4
commit
a4cd737ebb
2 changed files with 2 additions and 2 deletions
|
@ -87,7 +87,7 @@ module Capybara
|
|||
|
||||
def inspect
|
||||
%(#<#{self.class} tag="#{tag_name}" path="#{path}">)
|
||||
rescue NotSupportedByDriverError, 'Capybara::Driver::Node#inspect'
|
||||
rescue NotSupportedByDriverError
|
||||
%(#<#{self.class} tag="#{tag_name}">)
|
||||
end
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ module Capybara
|
|||
|
||||
def inspect
|
||||
%(#<Capybara::Element tag="#{tag_name}" path="#{path}">)
|
||||
rescue NotSupportedByDriverError, 'Capybara::Node::Element#inspect'
|
||||
rescue NotSupportedByDriverError
|
||||
%(#<Capybara::Element tag="#{tag_name}">)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue