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! While you're at it, check out some resources Treehouse students have shared here.

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

Ruby Ruby Basics Strings String Concatenation

a little lost on this one, to be honest. apparently, there is a syntax error but I am almost sure this is correct?

not sure where I am going wrong here

program.rb
def ruby (rocks!)
  puts "ruby" + " rocks!"
end 

1 Answer

The challenge is asking for output from a straight string concatenation. You don't need to define a function.

Jay McGavren
Jay McGavren
Treehouse Teacher

Lukas is correct. I should also note that your rocks! parameters is the source of the syntax error - ! isn't valid as part of a method parameter name.