From: Braxton Beyer Date: 2009-11-01T06:28:17+09:00 Subject: Re: how can i perform a one line case statement on a number Mario Camou wrote: > Use semicolons to separate statements: > > case 1000; when 100; "string1"; when 110; "string2"; else "Unknown"; > end > > -Mario. > > -- > I want to change the world but they won't give me the source code. well i am able to run the code on one line but my problem is being able to apply it directly to the number. So it needs to be something like 1000.codegoeshere or 1000.eval "code" But I am not sure how to do that. -- Posted via http://www.ruby-forum.com/.