From: Justin Collins Date: 2008-02-09T05:29:17+09:00 Subject: Re: convert String to range Abir B. wrote: > Hi, > is there a way to convert a string to a range?? > "(1..2)" ==> (1..2) ?? > Another question, what's the translation of infinite in ruby?? > thanks > Not recommended, but eval is always an option: irb(main):001:0> r = eval("(1..2)") => 1..2 irb(main):002:0> r.class => Range irb(main):003:0> r.to_a => [1, 2] -Justin