Ruby pass by value or reference, which one of them is used when object/variables are passed to the functions. This tutorial will help you understand how passing value/objects in Ruby work.
Read this post on rubyinrails.com