A crash occurs when combining (...) arg forwarding, a positional argument, and an array splat. Found with 4.0.0 release, verified on 3.4.8 and 4.1.0dev, does not occur on 3.3.10. One-line crash test: ``` ruby ./ruby -e 'def target(*a...inopinatus (Joshua GOODALL)
I'll speak up for this feature. Whilst writing a base58 encoder/decoder today, I was surprised by the lack of an inverse to `Integer#digits`. In my benchmarking the reduce/inject variant was considerably faster than the sum variant, esp...inopinatus (Joshua GOODALL)
I also had ``` ruby module Enumerable def **(proc) = each { |arg| proc[**arg] } end ary.map ** ->(foo:, bar:) { foo+bar } #=> [143, 222] ``` which is kinda fun, but not so readable. inopinatus (Joshua GOODALL)
I'm renovating some 2.x-era code that relied heavily on autosplat for block kwargs. As we all know, this throws an ArgumentError in Ruby 3: ``` ruby ary = [ { foo: 42, bar: 101 }, { foo: 99, bar: 123 } ] ary.map { |foo:, ba...inopinatus (Joshua GOODALL)
I think deprecation warnings are necessary if, and only if, a feature or behaviour is going away in the lifespan of the minor (2.x) versions. I also believe you can make any breaking change without prior warning in a major version (i....inopinatus (Joshua GOODALL)
I visualise a bag of grain. If I'm asked to divide it by three, I will make three piles of grain. If I'm asked to modulate it by three, I will make many piles, each of three grains. > why you need to refer to complex numbers This i...inopinatus (Joshua GOODALL)
> x / y reads "divide x by y", not "divide x into y parts" I'm not sure I understand the difference, but nevertheless I agree with Eragon's intuition. To me, a range is not a matrix, not a sequence either. I think of ranges as int...inopinatus (Joshua GOODALL)
I am another person with blocks affected in a production application codebase, found sixteen uses. I see a cluster of people reporting an issue. Are we the tip of an iceberg, or the entire iceberg? There is a school of programmer tha...inopinatus (Joshua GOODALL)
Could this take argument as well? I'd be keen for something in the spirit of `Enumerable#grep` but where an (optional) pattern evaluates the result of the block, rather than each element of the array. If omitted, there's the default te...inopinatus (Joshua GOODALL)