[#106341] [Ruby master Bug#18369] users.detect(:name, "Dorian") as shorthand for users.detect { |user| user.name == "Dorian" } — dorianmariefr <noreply@...>
Issue #18369 has been reported by dorianmariefr (Dorian Mari辿).
14 messages
2021/11/30
[#106351] [Ruby master Bug#18371] Release branches (release information in general) — "tenderlovemaking (Aaron Patterson)" <noreply@...>
Issue #18371 has been reported by tenderlovemaking (Aaron Patterson).
7 messages
2021/11/30
[ruby-core:106144] [Ruby master Bug#18345] Duplicate range in character class warning
From:
"halilsen (Halil Sen)" <noreply@...>
Date:
2021-11-18 14:32:21 UTC
List:
ruby-core #106144
Issue #18345 has been updated by halilsen (Halil Sen).
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. I will open a PR on the grape-swagger side. Cheers xtkoba!
https://github.com/ruby-grape/grape-swagger/blob/4ea61c4c2c0bd88043ebc15041b0eb3967b341ff/lib/grape-swagger.rb#L35
----------------------------------------
Bug #18345: Duplicate range in character class warning
https://bugs.ruby-lang.org/issues/18345#change-94742
* Author: halilsen (Halil Sen)
* Status: Open
* Priority: Normal
* ruby -v: >= 2.5.5
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
~~~ ruby
#!/usr/bin/env ruby -w
puts RUBY_VERSION
puts "".match?(/[\p{Alnum}|\-|\_]/).inspect
puts '--------------'
~~~
~~~ text
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.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>