/test/return.rb

http://github.com/feyeleanor/RubyGoLightly · Ruby · 18 lines · 14 code · 2 blank · 2 comment · 0 complexity · bebb6460ea8aa3fb2f44c66c4101005a MD5 · raw file

  1. def nomnom
  2. return
  3. puts "hi"
  4. end
  5. nomnom
  6. def return_me(this)
  7. return this
  8. raise "should not get here"
  9. end
  10. puts return_me(1)
  11. # => 1
  12. def steak(x, y)
  13. return x, y
  14. end
  15. puts steak(1, 2).size
  16. # => 2