I like this literal expression for an array of strings:
%w( i can easily create arrays of words )
I am wondering if there is a literal to get an array of symbols. I know I can do
%w( it is less elegant to create arrays of symbols ).map( &:to_sym )
but it would be so wonderful just to use a literal.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…