Nathan Broadbent

  • Email:
  • Registered on: 10/28/2012
  • Last connection: 11/13/2012

Activity

Reported issues: 5

01/25/2013

03:53 AM ruby-trunk 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?
...

11/20/2012

04:29 AM ruby-trunk 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 succum...

11/18/2012

11:55 AM ruby-trunk Feature #5478: import Set into core, add syntax
I really like `~[1, 2, 3]` as a shortcut for `Set.new([1, 2, 3])`:
class Array
def ~@
Set.new self
...

11/14/2012

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

I agree that 'Enumerable#to_h' woul...
04:23 AM ruby-trunk 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] ...

11/13/2012

08:29 AM ruby-trunk Feature #7341 (Open): Enumerable#associate
Jeremy Kemper proposed Enumerable#associate during the discussion in #7297, with the following details:
----------...
08:17 AM ruby-trunk Feature #7340 (Open): 'each_with' or 'into' alias for 'each_with_object'
Following on from the discussions at #7297 and #7241, it is apparent that a shorter alias for 'each_with_object' woul...
05:53 AM ruby-trunk Feature #7339: Version of super that doesn't raise when super undefined
We can already write:

super if defined?(super)

I don't think a shortcut would be necessary for that, s...
04:23 AM ruby-trunk Bug #7338: loop command doesn't accept begin/end, only { }
Hi there,

Try 'loop do' instead of 'loop begin'


Best,
Nathan

On Tuesday, 13 November 2012, dwild...

11/11/2012

06:53 PM ruby-trunk Feature #7241: Enumerable#to_h proposal
>
> Clojure has a function (({into})) that might fit the bill.
>>
>
> This indeed looks very promising.

...

Also available in: Atom