9/17 "return" error


Here is my code:

puts "Please insert your name:"
name = gets.chomp
def welcome(name)
return "Hello, #{name}"
I keep getting a "Oops, try again. It looks like your welcome method prints to the console instead of using return." error message, even though I clearly have a return statement, not puts or print. I have tried resetting the code, refreshing the web page, calling the method on my name as a string, and even rebuilding the method from scratch. Please help.


You don't need to have the first two lines there. Probably the test read your puts on the first line, that's why it gave that error.