Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 8a522e3

Browse files
author
Tobias Haagen Michaelsen
committed
Don't use explicit return inside Proc.
An explicit return inside a Proc can return from the current scope. This fixes an issue with the test exiting before all tests are run.
1 parent fc499f7 commit 8a522e3

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

test/test_discover.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -746,13 +746,9 @@ def test_discover_function
746746
# XXX these were all different tests in python, but they're
747747
# combined here so I only have to use with_method_overridden
748748
# once.
749-
discoverXRI = Proc.new { |identifier|
750-
return 'XRI'
751-
}
749+
discoverXRI = Proc.new { |identifier| 'XRI' }
752750

753-
discoverURI = Proc.new { |identifier|
754-
return 'URI'
755-
}
751+
discoverURI = Proc.new { |identifier| 'URI' }
756752

757753
OpenID.extend(OverrideMethodMixin)
758754

0 commit comments

Comments
 (0)