Skip to content

Use Regexp#=== to match loosely#298

Closed
nobu wants to merge 1 commit into
ruby:masterfrom
nobu:bug/deprecated-warning
Closed

Use Regexp#=== to match loosely#298
nobu wants to merge 1 commit into
ruby:masterfrom
nobu:bug/deprecated-warning

Conversation

@nobu

@nobu nobu commented Dec 7, 2018

Copy link
Copy Markdown
Member

Till ruby 2.5, Object#=~ silently ignored non-string argument, but it has been deprecated since ruby 2.6 and will be removed in the future. Use Regexp#=== instead, to match loosely.

Also /^-/ is not a proper pattern to tell if the argument starts with a -.

Till ruby 2.5, `Object#=~` silently ignored non-string argument,
but it has been deprecated since ruby 2.6 and will be removed in
the future.  Use `Regexp#===` instead, to match loosely.

Also `/^-/` is not a proper pattern to tell if the argument starts
with a `-`.
@hsbt

hsbt commented Dec 7, 2018

Copy link
Copy Markdown
Member

Fixed with #297

@hsbt hsbt closed this Dec 7, 2018
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 97.56% when pulling 3785620 on nobu:bug/deprecated-warning into 80e00e2 on ruby:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants