General

Profile

phluid61 (Matthew Kerwin)

Issues

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

Activity

02/20/2022

01:49 AM Ruby Feature #16295: Chainable aliases for String#-@ and String#+@
zverok (Victor Shepelev) wrote in #note-21:
> > `+@` seems very rarely useful
> ...
The overarching context for this ticket is chainable aliases. As syntactic dressing for a literal, yes there is value in the existing method names. And...
phluid61 (Matthew Kerwin)

12/06/2020

11:53 PM Ruby Feature #15975: Add Array#pluck
Apologies for posting to a closed ticket, but here's a thought in case it helps someone propose something else in future: partial application in `#to_proc`, e.g. `games.map(&(:[], :steam_id))`
I hate the syntax I just invented, but the ...
phluid61 (Matthew Kerwin)

11/25/2020

11:25 PM Ruby Feature #17342: Hash#fetch_set
chrisseaton (Chris Seaton) wrote in #note-3:
> `#fetch_or_set` could be a good name.
> ...
I can see the utilitiy, it would be good if it had a similar signature to #fetch :
```ruby
hsh = {}
hsh.fetch_or_set(:a, 1) # => 1, hsh = {...
phluid61 (Matthew Kerwin)

11/18/2020

12:32 AM Ruby Feature #17326: Add Kernel#must! to the standard library
jez (Jake Zimmerman) wrote in #note-16:
> A colleague pointed out that `or_else` has the nice property that it could replace the `||=` for default initializing instance variables:
> ...
Except that `@foo ||= x` is `@foo || (@foo = x)`,...
phluid61 (Matthew Kerwin)

11/17/2020

07:55 AM Ruby Feature #17314: Provide a way to declare visibility of attributes defined by attr* methods in a single expression
Dan0042 (Daniel DeLorme) wrote in #note-7:
> +1
> ...
``` ruby
attr_accessor :x, :y #=> ?
```
phluid61 (Matthew Kerwin)

11/13/2020

11:17 PM Ruby Bug #17318: Raising float to the power of other issue
deXterbed (Manoj Mishra) wrote in #note-3:
>
> ...
Don't raise a negative number to a non-Integer power. That's just maths.
phluid61 (Matthew Kerwin)

07/31/2020

10:51 PM Ruby Bug #15773: Net::HTTP doesn't try next IP address in case of timeout
benlangfeld (Ben Langfeld) wrote in #note-4:
>
> ...
Minor point, I don't think it affects much, but RFC 3484 is obsolete and is replaced by RFC 6724 https://tools.ietf.org/html/rfc6724
Cheers
phluid61 (Matthew Kerwin)

07/13/2020

09:01 PM Ruby Bug #17029: URI.parse considers https://example.com/### invalid when browsers consider it valid
It's not valid according to RFC 3986 (the URI standard) but that is pretty old now. I suspect switching from the IETF URI spec to the WHATWG URL spec would have other consequences, too. phluid61 (Matthew Kerwin)

11/07/2019

04:42 AM Ruby Feature #16295: Chainable aliases for String#-@ and String#+@
For what it's worth, I'm not *against* `#dedup` per se. `-@` is great for signalling a frozen literal, but in the context at hand the method is more likely to be used to deduplicate a derived value.
What about adding a parameter to a...
phluid61 (Matthew Kerwin)
03:05 AM Ruby Feature #16295: Chainable aliases for String#-@ and String#+@
alanwu (Alan Wu) wrote:
> I like `dedup` too. `-@` was introduced to expose deduplication in the first place.
#11782 :
> ...
The optimisations aren't part of the original specification. In fact, it was all about adding `+@`, beca...
phluid61 (Matthew Kerwin)

Also available in: Atom