--- Rie! <[EMAIL PROTECTED]> wrote:
> What i want to ask is more about language design
> cos I might've lost reading it from ruby-core
> mailing list and i've tried googling around but
> found nothing, what's the meaning of ruby compact
> actually if its output return result is just the
> same like the array before.
>
> ex.
>
> a = [ :a, :b, :c ]
> a << [ :a, :b ]
> => [ :a, :b, :c, [ :a, :b ] ]
> a.compact
> => [ :a, :b, :c, [ :a, :b ] ]
>
lho .compact kan buat filter out nil values, ri?
(tiap kali lihat .compact jadi inget mr Kamal :-) hi there ! :-)
rgds,
Edwin
________________________________________________________
Kunjungi halaman depan Yahoo! Indonesia yang baru!
http://id.yahoo.com/