[#111472] [Ruby master Bug#19274] Error installing ruby 3.2.0 on RH 8 — "aalllop (Alberto Allegue) via ruby-core" <ruby-core@...>
Issue #19274 has been reported by aalllop (Alberto Allegue).
5 messages
2022/12/28
[#111508] Data support for versions before 3.2.0 — Eustáquio Rangel via ruby-core <ruby-core@...>
I was wondering that every piece of code (gems, etc) that use the new Data =
3 messages
2022/12/29
[ruby-core:111193] [Ruby master Feature#19177] optional offset for Array#index
From:
"Dan0042 (Daniel DeLorme)" <noreply@...>
Date:
2022-12-04 00:26:39 UTC
List:
ruby-core #111193
Issue #19177 has been updated by Dan0042 (Daniel DeLorme).
Oops, duplicate of #17056, which has a PR and was accepted but... never merged?
----------------------------------------
Feature #19177: optional offset for Array#index
https://bugs.ruby-lang.org/issues/19177#change-100477
* Author: Dan0042 (Daniel DeLorme)
* Status: Open
* Priority: Normal
----------------------------------------
String#index allows an optional offset:
```ruby
"the quick brown fox jumps over the lazy dog".index("the") #=> 0
"the quick brown fox jumps over the lazy dog".index("the",1) #=> 31
```
I was a bit surprised that Array doesn't support this and I feel it would be a very natural addition:
```ruby
%w[the quick brown fox jumps over the lazy dog].index("the") #=> 0
%w[the quick brown fox jumps over the lazy dog].index("the",1) #=> 6 instead of ArgumentError
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- [email protected]
To unsubscribe send an email to [email protected]
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/