Skip to content

Commit

Permalink
Merge pull request teamcapybara#1296 from ironcladlou/ruby2-exception…
Browse files Browse the repository at this point in the history
…-handling

Use Ruby 2.x compatible rescue clauses
  • Loading branch information
twalpole committed May 6, 2014
2 parents 59f751f + a4cd737 commit 2b778ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/capybara/driver/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def trigger(event)

def inspect
%(#<#{self.class} tag="#{tag_name}" path="#{path}">)
rescue NotSupportedByDriverError, 'Capybara::Driver::Node#inspect'
rescue NotSupportedByDriverError
%(#<#{self.class} tag="#{tag_name}">)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/capybara/node/element.rb
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def reload

def inspect
%(#<Capybara::Element tag="#{tag_name}" path="#{path}">)
rescue NotSupportedByDriverError, 'Capybara::Node::Element#inspect'
rescue NotSupportedByDriverError
%(#<Capybara::Element tag="#{tag_name}">)
end
end
Expand Down

0 comments on commit 2b778ae

Please sign in to comment.