Ruby Ruby Basics Ruby Syntax Method Arguments

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"

say ("Ruby")

You are not correctly passing the param but are very close to the correct answer. Here is how I did it.

def say(name)
  puts name


1 Answer

Amrit Pandey
Amrit Pandey
17,594 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

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! :)