From: Kent Dahl Date: 2002-10-30T23:37:37+09:00 Subject: Re: feature idea: custom literals Nat Pryce wrote: > > On Wed, 2002-10-30 at 11:41, Nikodemus Siivola wrote: > > Vector.new(3,5,6) [ versus ] > > <3,5,6> > > But the former is *far* more readable. Yes, so a potential middle ground: module VectorUtil def V(s) eval "[#{s}]" # or use "Vector.new(#{s})" end end include VectorUtil p V %<1,2,3> #=> [1, 2, 3] Way crypting enough, thank you very much! :-) -- (\[ Kent Dahl ]/)_ _~_ __[ http://www.stud.ntnu.no/~kentda/ ]___/~ ))\_student_/(( \__d L b__/ NTNU - graduate engineering - 5. year ) ( \__\_�|�_/__/ ) _)Industrial economics and technological management( \____/_�_\____/ (____engineering.discipline_=_Computer::Technology___)