On Jul 11, 10:41=A0am, Alex LeDonne <aledonne.listm... / gmail.com> wrote:
> On Fri, Jul 11, 2008 at 12:12 PM, ara.t.howard <ara.t.how... / gmail.com> w=
rote:
>
> > On Jul 11, 2008, at 9:17 AM, Matthew Moss wrote:
>
> >> That is, the following test code should raise no exceptions:
>
> >> =A0 1000.times do |i|
> >> =A0 =A0 s =3D symbolify(i)
> >> =A0 =A0 raise "Not a string!" =A0unless s.is_a? String
> >> =A0 =A0 raise "Invalid chars!" unless s.delete("?*()-").empty?
>
> >> =A0 =A0 x =3D eval(s)
> >> =A0 =A0 raise "Decode failed!" unless i =3D=3D x
> >> =A0 end
>
> > i've got one line - tests pass.
>
> Me too. My method body is one line, 25 characters. Did you manage to
> stretch yours to 42? :)
>
> -A

And it works for negative integers too?

Chris