The dRuby Book

Chapter 4
Pass by Reference, Pass by Value

In this chapter, we’ll learn two different ways to exchange objects: passing by reference and passing by value. We briefly discussed this topic in Pass by Reference, Pass by Value, but we’ll discuss it in greater detail in this chapter. The difference is especially important when you use dRuby, so let’s start with some background to make sure you understand how it all works.