Skip to content

Commit 1f555ad

Browse files
committed
Lint/UriRegexp
Rubocop says "URI.regexp is obsolete and should not be used. Instead, use "URI::DEFAULT_PARSER.make_regexp". Currently those things are equal: URI::DEFAULT_PARSER.make_regexp == URI.regexp => true This prepares us for when URI.regexp goes away in the future.
1 parent 6a9e2d5 commit 1f555ad

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -712,11 +712,6 @@ Lint/UnusedBlockArgument:
712712
Lint/UnusedMethodArgument:
713713
Enabled: false
714714

715-
# This cop supports safe auto-correction (--auto-correct).
716-
Lint/UriRegexp:
717-
Exclude:
718-
- 'lib/puppet/pops/pcore.rb'
719-
720715
# This cop supports safe auto-correction (--auto-correct).
721716
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
722717
Lint/UselessAccessModifier:

lib/puppet/pops/pcore.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Puppet::Pops
55
module Pcore
66
include Types::PuppetObject
77

8-
TYPE_URI_RX = Types::TypeFactory.regexp(URI.regexp)
8+
TYPE_URI_RX = Types::TypeFactory.regexp(URI::DEFAULT_PARSER.make_regexp)
99
TYPE_URI = Types::TypeFactory.pattern(TYPE_URI_RX)
1010
TYPE_URI_ALIAS = Types::PTypeAliasType.new('Pcore::URI', nil, TYPE_URI)
1111
TYPE_SIMPLE_TYPE_NAME = Types::TypeFactory.pattern(/\A[A-Z]\w*\z/)

0 commit comments

Comments
 (0)