9/17 "return" error


#1

Here is my code:

puts "Please insert your name:"
name = gets.chomp
def welcome(name)
return "Hello, #{name}"
end
welcome(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.


#2

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.


#3