From: Pen Ttt on
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
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/.