Skip to content

Commit 67c95cc

Browse files
committed
Use URI::DEFAULT_PARSER
…also re-enables RSpec warnings. This change addresses the warning around `URI.extract` being obsolete. The method still exists, but seems like new(ish) Rubies prefer use of `URI::DEFAULT_PARSER` (or one of the other parsers).
1 parent 32999d7 commit 67c95cc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/webmention/parsers/plaintext_parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class PlaintextParser < Parser
1010

1111
# @return [Array<String>] An array of absolute URLs.
1212
def results
13-
@results ||= URI.extract(response_body, %w[http https])
13+
@results ||= URI::DEFAULT_PARSER.extract(response_body, %w[http https])
1414
end
1515
end
1616
end

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979

8080
# This setting enables warnings. It's recommended, but in some cases may
8181
# be too noisy due to issues in dependencies.
82-
# config.warnings = true
82+
config.warnings = true
8383

8484
# Many RSpec users commonly either run the entire suite or an individual
8585
# file, and it's useful to allow more verbose output when running an

0 commit comments

Comments
 (0)