Hi guys, I'm newbie of ruby and I tried to use the method
in_groups_of(x, false)
in irb i wrote:
irb(main):001:0> a = (1..12).to_a
=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
irb(main):002:0> a.in_groups_of(4)
NoMethodError: undefined method `in_groups_of' for [1, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12]:Array
from (irb):2
Can someone explain me what is wrong? thanks
···
--
Posted via http://www.ruby-forum.com/.