Ruby appears to use the object passing strategies; pass by value and pass by reference. Immutable objects such as integers, booleans, and nil seem to use pass by value. Mutable objects such as strings seems to use pass by reference.

Immutable values that are passed into a method will leave…

Matt Malane

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store