According to this question, ruby is strictly pass-by-value. I came across a case though, which consists of modifying a hash like so:
h = {"one" => ["un", "ein"], "two"=> ["deux", "zwei"]}
h.each { |k,v| v << "overriden"}
resulting in:
{"one"=>["un", "ein", "overriden"], "two"=>["deux", "zwei", "overriden"]}
However, the following behaves differently:
h = {"one" => "un", "two"=> "deux"}
h.each { |k,v| v = "overriden"}
resulting in:
{"one"=>"un", "two"=>"deux"}
How could I have predicted this?