Hi there, Im kinda stucked with a ruby script Im working on, its a - TopicsExpress



          

Hi there, Im kinda stucked with a ruby script Im working on, its a pretty simple case switch, Im trying to do something like when this OR this OR this. The code looks like this: pool = gets.chomp case pool when string1, string2, string3 Do something when string4, string5, string6 Do something else else Other end So when I run the script (May I remark Im using ruby 1.8.7 under debian squeeze, latest version). ./versioner.rb:64: syntax error, unexpected kWHEN, expecting kEND when string1, string2, string3 Ive been google a while and looking into stackoverflow but couldnt find a solution. What am I doing wrong? Ive seen in several pages the syntax looks pretty much like that. Thanks in advance.
Posted on: Thu, 01 Jan 2015 00:51:04 +0000

Trending Topics



Recently Viewed Topics




© 2015