From: Pen Ttt on 14 Apr 2010 01:18 there is one commade: '["ffgh"]78'.split(/\[|\]/).reject(&:empty?) i can get two character: "ffgh" 78 but i don't know what is the meaning of : &:empty? 1\what is : 2\what is &: think you for advance. -- Posted via http://www.ruby-forum.com/.
From: Brian Candler on 14 Apr 2010 04:45 Pen Ttt wrote: > 1\what is : Identifies the start of a symbol literal. That is, :empty? is a symbol (in this case, being used as the name of a method) > 2\what is &: http://pragdave.pragprog.com/pragdave/2005/11/symbolto_proc.html -- Posted via http://www.ruby-forum.com/.
|
Pages: 1 Prev: rp_trap_pending/rb_trap_exec in 1.9? Next: how can i add tones to my pc's sound card |