Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def mtdarry
- 6.times do |num|
- square = num * num
- return (num, square) if num > 5
- end
- end
- # using parallel assignment to collect the return value
- num, square = mtdarry
- puts num
- puts square
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement