`match?` alias for `=~` in `StrongJSON::Type::Match`
Closed this issue · 2 comments
ybiquitous commented
Does it make sense to add match?
alias for =~
?
strong_json/lib/strong_json/type.rb
Lines 5 to 16 in faf4b46
This idea is inspired by Regexp#match?
and Regexp#=~
.
In addition (it might be trivial), I think the alias can avoid warnings by RuboCop's Performance/RegexpMatch rule.
soutaro commented
I'm not very positive for adding another exact alias match?
because it does not have any special meaning in Ruby, while I don't have strong reason to reject the idea. So, you can open a pull request.
ybiquitous commented
Thanks for the response! I see. 👍
The idea does not make sense well, so I'll close this issue.
In the future, when it will be necessary for me, I may open a PR. 😅