It’s a basic question that I myself had a problem with when i started using Ruby: Does Ruby pass by value or by reference? Well, if you want a direct answer, then: Ruby passes by value. It’s a similar behavior of what Java does. Let’s prove it via examples: Update: this example was passing integers, […]