--f46d0444808beb349904afba3e83
Content-Type: text/plain; charset=UTF-8
On Thu, Oct 20, 2011 at 1:27 PM, Dan Nachbar <dan / nachbar.com> wrote:
> Has #group_by been integrated into Ruby?
>
> Last I heard, it was still only available as part
> of ActiveSupport although there was talk of working
> it into 1.9.
>
It is part of core. Fairly easy to check:
http://ruby-doc.org/core-1.8.7/Enumerable.html#method-i-group_byhttp://ruby-doc.org/core-1.9.2/Enumerable.html#method-i-group_by
$ irb
>> RUBY_VERSION
"1.9.2"
>> Enumerable.instance_methods.grep(/group/)
[:group_by]
$ irb
>> RUBY_VERSION
["group_by"]
Plus ri, if you have it working.
--f46d0444808beb349904afba3e83--