[#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:106133] [Ruby master Bug#18345] Duplicate range in character class warning
From:
"xtkoba (Tee KOBAYASHI)" <noreply@...>
Date:
2021-11-18 11:47:35 UTC
List:
ruby-core #106133
Issue #18345 has been updated by xtkoba (Tee KOBAYASHI).
`|` seems to appear twice.
----------------------------------------
Bug #18345: Duplicate range in character class warning
https://bugs.ruby-lang.org/issues/18345#change-94730
* 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:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>