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 Ruby Syntax Method Return Values

Christopher Davis
Christopher Davis
8,555 Points

I'm confused by how to always return the number 3 or 5 here.

I'm asked to define a method that will always return the number 3, and another that will always return the number 5. Neither method should take any arguments. I can't get it to work. Can I get some help?

methods.rb
def three(number)
  puts number
end

def five(number)
  puts number
end

three(3)
five(5)

1 Answer

There are no arguments so number is out. It may be simpler than you think. Have you tried return 3?