Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Suppress deprecation warning for Regexp.new with 3rd argument #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cookiejar/cookie_validation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module PATTERN
HDN = /\A#{PATTERN::HOSTNAME}\Z/
TOKEN = /\A#{PATTERN::TOKEN}\Z/
PARAM1 = /\A(#{PATTERN::TOKEN})(?:=#{PATTERN::VALUE1})?\Z/
PARAM2 = Regexp.new "(#{PATTERN::TOKEN})(?:=(#{PATTERN::VALUE2}))?(?:\\Z|;)", '', 'n'
PARAM2 = Regexp.new "(#{PATTERN::TOKEN})(?:=(#{PATTERN::VALUE2}))?(?:\\Z|;)", Regexp::NOENCODING
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [100/80]

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already over 80 line length in this lib/cookiejar/cookie_validation.rb. Also, RuboCop's default is not 80.
rubocop/rubocop#7952

This line length can be changed to 80 or less, but it probably won't improve readability, so I'm leaving it there.

# TWO_DOT_DOMAINS = /\A\.(com|edu|net|mil|gov|int|org)\Z/

# Converts the input object to a URI (if not already a URI)
Expand Down