Actions
Bug #18345
closedDuplicate range in character class warning
Description
#!/usr/bin/env ruby -w
puts RUBY_VERSION
puts "".match?(/[\p{Alnum}|\-|\_]/).inspect
puts '--------------'
trial.rb:3: warning: character class has duplicated range: /[\p{Alnum}|\-|\_]/
2.5.5
false
--------------
trial.rb:3: warning: character class has duplicated range: /[\-|\p{Alnum}|\_]/
2.7.4
false
--------------
If I remove any part of the character class definition []
, there is no warning but
I don't think there's a duplicate range here, so there should not be a warning.
Updated by xtkoba (Tee KOBAYASHI) over 2 years ago
|
seems to appear twice.
Updated by halilsen (Halil Sen) over 2 years ago
xtkoba (Tee KOBAYASHI) wrote in #note-1:
|
seems to appear twice.
Effectively, I didn't see the |
s, I must have parse them as logical or. This issue can be closed.
I will open a PR on the grape-swagger side. Cheers xtkoba!
Updated by nobu (Nobuyoshi Nakada) over 2 years ago
- Status changed from Open to Rejected
Actions
Like0
Like0Like0Like0