General

Profile

tomstuart (Tom Stuart)

  • Login: tomstuart
  • Email: hi@tomstu.art
  • Registered on: 07/01/2015
  • Last sign in: 11/17/2025

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 4 5

Activity

08/04/2023

07:42 AM Ruby Feature #19830: Allow `Array#transpose` to take an optional size argument
nobu (Nobuyoshi Nakada) wrote in #note-1:
> Why not `ary.transpose[1]&.join`?
That avoids the exception but returns `nil` instead of taking advantage of `#join`’s knowledge of the “correct” result for an empty array, i.e. the empty s...
tomstuart (Tom Stuart)

08/03/2023

05:42 PM Ruby Feature #19830 (Open): Allow `Array#transpose` to take an optional size argument
One benefit of supplying an initial value to `Enumerable#inject` is that it avoids an annoying edge case when the collection is empty:
```
>> [1, 2, 3].inject(:+)
=> 6 # good
> ...
=> nil # bad
>> [].inject(0, :+)
=> 0 # good...
tomstuart (Tom Stuart)

07/15/2023

03:39 PM Ruby Revision 72a3bb7e (git): Allow `--backtrace-limit` option to appear in RUBYOPT
There’s no reason to prevent RUBYOPT from controlling the backtrace
limit. In fact, Matz said [0] he was expecting this to be possible.
[0] https://bugs.ruby-lang.org/issues/8661#note-27
tomstuart (Tom Stuart)
03:39 PM Ruby Revision de68e240 (git): Allow -1 as the value of `--backtrace-limit` option
-1 is a legitimate backtrace limit — in fact, it’s the default — so it
should be possible to provide it with the `--backtrace-limit` option.
tomstuart (Tom Stuart)
03:39 PM Ruby Revision c32b608e (git): Add `--backtrace-limit` option to the man page
tomstuart (Tom Stuart)

07/13/2023

05:20 PM Ruby Feature #19752: Allow `--backtrace-limit` to appear in RUBYOPT
Thank you @nobu. I’ve rebased https://github.com/ruby/ruby/pull/8010 onto `master` to include your fix, and added your test. tomstuart (Tom Stuart)
08:01 AM Ruby Feature #19752: Allow `--backtrace-limit` to appear in RUBYOPT
Thank you for accepting!
Currently (i.e. on `master` with this patch applied), `--backtrace-limit` in `RUBYOPT` has higher precedence than the command line option:
```
% ruby -v
ruby 3.3.0dev (2023-07-13T07:54:27Z backtrace-limit...
tomstuart (Tom Stuart)

07/10/2023

10:24 AM Ruby Feature #19752: Allow `--backtrace-limit` to appear in RUBYOPT
My main goal is to allow `RUBYOPT` to support `--backtrace-limit`.
I am happy to remove the ability to say `--backtrace-limit=-1` from my patch if it’s undesirable, but since `-1` is already a meaningful value for the backtrace limit, i...
tomstuart (Tom Stuart)

07/01/2023

02:55 PM Ruby Feature #19752 (Closed): Allow `--backtrace-limit` to appear in RUBYOPT
The `--backtrace-limit` option was added in #8661 but it is not currently supported in the `RUBYOPT` environment variable, which appears to be a mistake. Unlike other long options which are not allowed in `RUBYOPT` (e.g. `--copyright`, `... tomstuart (Tom Stuart)

12/03/2022

02:26 PM Ruby Feature #19000: Data: Add "Copy with changes method" [Follow-on to #16122 Data: simple immutable value object]
RubyBugs (A Nonymous) wrote in #note-29:
> please consider that making no-args an error makes programming around this API dynamically more complicated
I second this request. In the interests of regularity, it should be fine to ask fo...
tomstuart (Tom Stuart)

Also available in: Atom