General

Profile

TylerRick (Tyler Rick)

  • Login: TylerRick
  • Email: tyler@tylerrick.com
  • Registered on: 08/27/2008
  • Last sign in: 09/09/2024

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 3 2 5

Activity

09/09/2024

11:16 PM Ruby Feature #13820: Add a nil coalescing operator
Ruby already has the safe navigation operator `?.`, added back in Ruby 2.3, which was definitely a step in the right direction with regards to first-class `nil`-aware operations.
Now we just need a null coalescing operator like most o...
TylerRick (Tyler Rick)

06/09/2021

04:55 AM Ruby Feature #17942 (Open): Add a `initialize(public @a, private @b)` shortcut syntax for defining public/private accessors for instance vars as part of constructor
This proposal builds on the proposed `initialize(@a, @b)` instance var assignment shortcut syntax described in #15192.
1. It allows you to add an *optional* `public`/`protected`/`private` modifier before any instance var parameter. Do...
TylerRick (Tyler Rick)
04:21 AM Ruby Feature #15192: Introduce a new "shortcut assigning" syntax to convenient setup instance variables
## Same feature in TypeScript
It's worth mentioning that other languages have a shortcut for assignment var assignment directly from constructor parameters. So it seems especially painful that Ruby, despite being *so* beautifully elegan...
TylerRick (Tyler Rick)

07/29/2020

12:14 AM Ruby Feature #15580: Proposal: method addition to class String called .indices ( String#indices )
duerst (Martin Dürst) wrote in #note-1:
> Just a quick question: Should the results include overlaps or not? I.e. is it
> ...
Good question! For what it's worth, it looks like the [`String#index_all` version](https://github.com/rubyworks...
TylerRick (Tyler Rick)
12:12 AM Ruby Feature #15580: Proposal: method addition to class String called .indices ( String#indices )
See also #6596, which proposes adding a similar method to `Array` (`Array#indexes`).
I don't know which term ("indices" or "indexes") is preferred. (They [are both widely used plural forms](https://grammarist.com/usage/indexes-indices...
TylerRick (Tyler Rick)

07/28/2020

11:53 PM Ruby Feature #17056 (Open): Array#index: Allow specifying the position to start search as in String#index
I have a use case of finding the first matching line within a given section in a file. After finding the line number of the start of the section, I want to find the first match after that line.
My workaround for now is to use `with_in...
TylerRick (Tyler Rick)
11:03 PM Ruby Feature #6596: New method `Array#indexes`
I'm not very good at writing C, but here is a reference implementation in Ruby (plus unit tests) in case it's helpful: https://github.com/rubyworks/facets/pull/294/files
This version adds `indexes` (aliased as `index_all`) to `Array`,...
TylerRick (Tyler Rick)
09:20 PM Ruby Feature #6596: New method `Array#indexes`
I would really like to see this included in Ruby. I have wished for this method several times in the past, and again today.
What can I do to help move this proposal forward?
TylerRick (Tyler Rick)

07/20/2020

07:58 PM Ruby Feature #11815: Proposal for method `Array#difference`
I would really like to see this included in Ruby.
Is there anything we can do to move this forward?
Do we just need to find a good name for it, now that `Array#difference` has been added with set semantics the same as `Array#-`?
TylerRick (Tyler Rick)

04/18/2019

11:41 PM Ruby Feature #8834: Kernel#load_relative
This seems like a curious omission. It would be useful to have a `load_relative` that loads relative to the script path calling it, like `require_relative`.
I guess the workaround is to use `__dir__`?
``` ruby
load File.join(__dir...
TylerRick (Tyler Rick)

Also available in: Atom