c4am95 (Travis Hunter)
- Login: c4am95
- Email: c4am95@gmail.com
- Registered on: 10/03/2018
- Last sign in: 12/29/2021
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 1 | 1 | 2 |
Activity
05/28/2021
-
02:46 PM Ruby Feature #17924 (Open): Range#infinite?
- A boolean method on Range returning true if the range is infinite and false if it is not.
04/07/2021
-
07:17 PM Ruby Feature #15198: Array#intersect?
- Matz/Marc-Andre: anything I can do to help here as far as documentation or providing more use cases? I/my colleagues would love to see this make it into Ruby.
10/23/2019
-
05:58 PM Ruby Feature #15198: Array#intersect?
- I tried setting that up here: https://github.com/ruby/ruby/pull/2598
I ignored infinite ranges for now
10/08/2018
-
05:10 PM Ruby Feature #15198: Array#intersect?
- It also seems like it comes up fairly commonly on stackoverflow/blogs:
https://stackoverflow.com/questions/2603895/how-can-i-check-if-a-ruby-array-includes-one-of-several-values
https://www.ruby-forum.com/t/find-if-an-array-has-any-ele...
10/07/2018
-
11:19 PM Ruby Feature #15198: Array#intersect?
- I threw together an example in a [gist](https://gist.github.com/travisofthenorth/eb2a68f5cd309dc7442ec4e1e55ae117) which is very similar to the use case I described. I have also run into numerous other situations where this functionality...
10/05/2018
-
02:01 PM Ruby Feature #15198: Array#intersect?
- The most recent example I encountered was authorizing a user in a Rails endpoint. Each user has a list of abilities, and each endpoint has a list of abilities that is authorized to perform the action. We just need to check if there is an...
10/03/2018
-
08:07 PM Ruby Feature #15198 (Closed): Array#intersect?
- I frequently find myself needing to determine if two arrays intersect but not actually caring about the intersection, so I write code like:
~~~ ruby
(a1 & a2).any?
~~~
It would be nice to have an **intersect?** convenience method o...