Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Brent Rainwater3,802 Points
nothing is working on this one
I've tried this every way I can think of and still nothing works what am I doing wrong?
def say(Ruby) puts "Ruby" end say ("Ruby")
Amrit Pandey17,595 Points
In reality if you run this program in irl(ruby shell) it will work!
But, the process is wrong, you are hard coding "Ruby" string in the method.
What you wanna do is to create a method that prints whatever you pass in it. And the challenge says that you have to pass "Ruby"
so lets create a method
def say(something_to_say) puts something_to_say end
now whatever you pass in place of something_to_say, method will print it.
let's pass "Ruby" in it
Now it will print Ruby! :)