From: Mark Volkmann Date: 2006-04-13T02:47:47+09:00 Subject: Re: Shame on me poorr newbie " unexpected kend" On 4/12/06, alex mic wrote: > Hi, > > I am trying to learn ruby through a udev utility coding. > I usually manage to debug on my own but in this case i dont understand > what is wrong... > > def finddevice() > puts "We are now trying to find the device" > found=0 > store=0 > quest="u" > while found!=1 > io = IO.popen("cat /proc/scsi/usb-storage/#{store}", "r+") > io.close_write > str = io.read > while quest!="y" or quest!="n" > puts "This is what is found on /proc/scsi/usb-storage/#{store}. Is > it your device [y/n]" > quest=gets.chop!.downcase > if quest=="y" > found=1 > @procdata = str > else > store ++ Ruby doesn't support ++. I don't know if that's the only problem though. > end > end > end > end > > I get an unexpected kend at the end following the else... > I have one function, two while and one if - else, which mean four "end" > I tried to end the if before the else and to not end the else (because > of one line only) with no success. > > Shamefull but I come for help. -- R. Mark Volkmann Object Computing, Inc.