General

Profile

nathan.f77 (Nathan Broadbent)

Issues

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

Activity

12/03/2018

08:05 PM Ruby Bug #15375 (Closed): Crash report for Ruby 2.5.3p105
Hello, Ruby 2.5.3 just crashed with a segfault in my Sidekiq worker. This is on my Mac OS Mojave, and I am using the jemalloc allocator. Ruby was installed using RVM.
I have attached "ruby-crash-report-logs.txt", which contains the ou...
nathan.f77 (Nathan Broadbent)

07/16/2014

08:54 PM Ruby Feature #10040: `%d` and `%t` shorthands for `Date.new(*args)` and `Time.new(*args)`
> Nathan, Date is only available in stdlib (maybe it should be moved to core) so I don't think those literals will work for dates with "D".
I would definitely vote to move Date to core, I think that's a great idea
> ...
Yep, I thin...
nathan.f77 (Nathan Broadbent)
06:09 AM Ruby Feature #10040: `%d` and `%t` shorthands for `Date.new(*args)` and `Time.new(*args)`
Nobuyoshi Nakada wrote:
> I don't think there is possibilities to introduce `%d` and `%i`, especially using variables.
I understand if the syntax doesn't feel quite right, I'm not sure about it either. But I think it should be quite ...
nathan.f77 (Nathan Broadbent)

07/15/2014

08:30 PM Ruby Feature #10040 (Feedback): `%d` and `%t` shorthands for `Date.new(*args)` and `Time.new(*args)`
I'm working on a Ruby application where we have to deal with a lot of dates and times, especially in our test suite. We currently have a couple thousand cases of `Date.new(...)`, and I'm finding the syntax to be a little unwieldy.
Wha...
nathan.f77 (Nathan Broadbent)

01/25/2013

03:53 AM Ruby Feature #7739: Define Hash#| as Hash#reverse_merge in Rails
I would personally love a more concise way to merge/reverse_merge hashes. Would you also propose Hash#& as merge?

P.S. in your example, a reverse_merge should result in :b => 2


On Friday, 25 January 2013 at 1:57 AM, alexe...
nathan.f77 (Nathan Broadbent)

11/20/2012

04:29 AM Ruby Feature #7388: Object#embed
>
> I'd even say that `embed` is wrong.
>
> I would like to know of a good example of use case. I often succumb to the
> temptation of writing more complex code to avoid creating a local var, but
> that doesn't always make for...
nathan.f77 (Nathan Broadbent)

11/18/2012

11:55 AM Ruby Feature #5478: Add syntax to import Set into core
I really like `~[1, 2, 3]` as a shortcut for `Set.new([1, 2, 3])`:
```ruby
class Array
def ~@
Set.new self
end
end
```
My other preferences would be:
1) `<1, 2, 3>`
2) `{1, 2, 3}`, and `{/}` for `Set.new`.
nathan.f77 (Nathan Broadbent)

11/14/2012

04:53 AM Ruby Feature #7341: Enumerable#associate
>
> 1) The form you suggest would be redundant with `Enumerable#to_h`
>

I agree that 'Enumerable#to_h' would seem more appropriate than the
block-less version of 'associate'. To me, the 'associate' verb implies that
the pro...
nathan.f77 (Nathan Broadbent)
04:23 AM Ruby Feature #7346: object(...) as syntax sugar for object.call(...)
@rosenfeld, I'll just mention that you can use Proc#[] in your example:

double = -> n { n * 2 }

double[3] == 6 #=> true


On Wednesday, 14 November 2012, rosenfeld (Rodrigo Rosenfeld Rosas) wrote:

>
> Issue #7346...
nathan.f77 (Nathan Broadbent)

11/13/2012

08:29 AM Ruby Feature #7341 (Open): Enumerable#associate
Jeremy Kemper proposed Enumerable#associate during the discussion in #7297, with the following details:
-------------------
Some background:
#4151 proposes an Enumerable#categorize API, but it's complex and hard to understand it...
nathan.f77 (Nathan Broadbent)

Also available in: Atom