Here is a little chunk of code that may help you
puts 'I am a fortune-teller. Tell me your first name:'
fname = gets.chomp
puts 'What is your last name.'
lname = gets.chomp
puts 'Hello, '+ fname + ' '+ lname + '. ''Your name is a great one!'
···
-----Original Message-----
From: Acoole Cooland [mailto:andrewchinna@yahoo.co.uk]
Sent: Friday, May 18, 2007 11:47 AM
To: ruby-talk ML
Subject: A bit of help
Ok say i was using this code using SciTE
puts 'Hello there, and what\'s your name?'
name = gets
puts 'Your name is ' + name + '? What a lovely name!'
puts 'Pleased to meet you, ' + name + '. :)'
After i input my name in the gets, and press enter it just skips the
rest of the program and closes it!
Whats wrong?
Thanks,
--
Posted via http://www.ruby-forum.com/.