From: alex mic Date: 2006-04-13T02:35:50+09:00 Subject: Shame on me poorr newbie " unexpected kend" 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 ++ 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. Regards Alexmic -- Posted via http://www.ruby-forum.com/.