General

Profile

myronmarston (Myron Marston)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 13 13

Activity

08/18/2022

05:05 PM Ruby Feature #16122: Data: simple immutable value object
If “data” is the naming direction folks like, I think the class name should be DataClass. This aligns with kotlin (where data is a keyword before the class keyword) and reads better, IMO: DataClass.new gives you a new class whose purpose... myronmarston (Myron Marston)

01/30/2022

09:48 PM Ruby Feature #16122: Data: simple immutable value object
I'm quite fond of this proposal--I basically never use Struct unless I specifically need mutability and have been using the values gem for years, which has a simple implementation of about 100 lines:
https://github.com/tcrayford/Value...
myronmarston (Myron Marston)

12/28/2020

08:52 PM Ruby Bug #17488 (Closed): Regression in Ruby 3: Hash#key? is non-deterministic when argument uses DelegateClass
Upon upgrading a library to run on Ruby 3.0, I have observed that `Hash#key?` has non-deterministic behavior when the argument uses `DelegateClass`. This non-deterministic behavior was not present in Ruby 2.7.
Reproducing this is slig...
myronmarston (Myron Marston)

01/02/2018

06:52 AM Ruby Feature #14045: Lazy Proc allocation for block parameters
> Don't report a bug on a closed feature, report it as a new bug (and link to the feature), thanks.
Thanks, I wasn't aware which way was preferred. I've opened #14267 to report this as a new bug.
> ...
Agreed, but when dealing wit...
myronmarston (Myron Marston)
06:47 AM Ruby Feature #14267 (Closed): Lazy proc allocation introduced in #14045 creates regression
The following script consistently prints `Proc equality: true` on versions of Ruby before 2.5, but prints `Proc equality: false` on Ruby 2.5:
``` ruby
# regression.rb
def return_proc(&block)
block
end
def return_procs(&block)...
myronmarston (Myron Marston)

01/01/2018

08:31 PM Ruby Feature #14045: Lazy Proc allocation for block parameters
For those who are interested, the work around I've implemented in RSpec is [here](
https://github.com/rspec/rspec-core/pull/2497/commits/84670489bb4943a62e783bd65f96e4b55360b141):
``` patch
From 84670489bb4943a62e783bd65f96e4b55360b...
myronmarston (Myron Marston)
08:14 PM Ruby Feature #14045: Lazy Proc allocation for block parameters
This change introduces a bug in RSpec. I'm working on a work around for RSpec (and hope to cut a release with a fix soon) but users running Ruby 2.5 with an older RSpec version will be affected, and the slight change in semantics introd... myronmarston (Myron Marston)

08/27/2015

07:53 PM Ruby Feature #11491: Add descriptive methods to Method & UnboundMethod
I think that `Method#instance_method?` and `UnboundMethod#instance_method?` would be very confusing, because my mental model is that _every_ method is an instance method of some class -- it's just that the class might be a singleton clas... myronmarston (Myron Marston)

05/04/2015

06:37 PM Ruby Bug #11113: Time ranges cannot be used in case statements in 1.9+ but they could in 1.8.7
Thanks for the prompt fix, @nobu!!
On a side note, I wasn't notified by email of your fix even though I'm watching this issue so I get notified of updates. Do you know why that is?
myronmarston (Myron Marston)

05/01/2015

10:56 PM Ruby Bug #11113: Time ranges cannot be used in case statements in 1.9+ but they could in 1.8.7
> The "can't iterate" error is simply because Time is float-based: there is no succ number.
Floats don't have a `succ` method, and yet `(2.3...3.2) === 3.0` works just fine. Actually, I'm surprised that `succ` is used for `===` at al...
myronmarston (Myron Marston)

Also available in: Atom