From: "Jesús Gabriel y Galán" Date: 2008-10-16T23:13:46+09:00 Subject: Re: what is [] here On Thu, Oct 16, 2008 at 3:58 PM, Raj Singh wrote: > class User > puts [].methods.size > puts self.methods.size > end > > > What does it mean to have [] method at a class level? Where is the > documentation for it? [] is a literal for a new empty Array. irb(main):001:0> [].object_id => -606116168 irb(main):002:0> [].object_id => -606126028 irb(main):003:0> [].object_id => -606134558 irb(main):004:0> [].class => Array Jesus.