From: "Ara.T.Howard" Date: 2004-08-07T00:41:28+09:00 Subject: Re: %w for symbols On Fri, 6 Aug 2004, David A. Black wrote: > That actually points to another thing I was wondering about, namely, > what would be the %?{ } equivalent of: > > ["abc".intern, "hi there".intern] > > You couldn't do (using %m as a placeholder here): > > %m{abc hi there} > > It would have to be > > %m{abc "hi there"} > > I'm just wondering whether that would lead down a path of escape syntax that > would make it less streamlined. we are already down that path jib:~ > ruby -r yaml -e 'y %w(abc hi there)' --- - abc - hi - there eg. there is not %w equivalent of ["abc", "hi there"] and this has not been a problem. i don't think it would be a problem for symbols either since you could never really need to do obj.send 'hi there'.intern since you could never define def hi there 42 end and you could never need hash['hi there'.intern] since you could not type hash[:hi there] well, never is a strong word - but this issue seems even more unlikely to occur than needing to do it via a wordlist since symbols containing white space are far and few between. regards. -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | A flower falls, even though we love it; | and a weed grows, even though we do not love it. | --Dogen ===============================================================================