Ruby Ruby Basics Ruby Syntax Method Arguments

Sudhir Raghur Venkatesalu
Sudhir Raghur Venkatesalu
6,114 Points

Why i get "uninitialized constant Ruby Error

def say(first) puts first end say Ruby

test.rb:4:in `<main>': uninitialized constant Ruby (NameError)

1 Answer

KRIS NIKOLAISEN
KRIS NIKOLAISEN
54,288 Points

If Ruby is a string it should be enclosed in quotes.

def say(first)
  puts first
end

say "Ruby"
Sudhir Raghur Venkatesalu
Sudhir Raghur Venkatesalu
6,114 Points

Thanks Very much, it worked. appreciate your help.