From: Bertram Scharpf Date: 2009-05-26T02:56:21+09:00 Subject: Re: hash assignment [:x] vs ['x'] Hi, Am Dienstag, 26. Mai 2009, 02:19:29 +0900 schrieb Mk 27: > bob['phone'] > bob[:phone] > > That seems slightly weird, I had assumed the :form is just a shorthand > like %w( ). So -- is there anything more that I need to understand > about this distinction? $ irb irb(main):001:0> :phone.class => Symbol irb(main):002:0> 'phone'.class => String and irb(main):003:0> :phone.methods.sort - 'phone'.methods => ["id2name", "to_int"] irb(main):004:0> String.instance_methods.sort - Symbol.instance_methods => [ ... (loads)] :phone.methods == Symbol.instance_methods Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de