Archive for September 28th, 2009

From the books: Exceptions to Ruby’s standard variable assignment by reference behavior

The un-reference: immediate values
Some objects in Ruby are stored in variables as immediate values. These include integers, symbols (which look like :this), and the special objects true, false and nil. When you assign one of these values to a variable (x = 1), the variable holds the value itself, rather than a reference to it

– From page 54 of The Well Grounded Rubyist by Robert Black

Filed under Things I did not know about Ruby :D

41A+B9T4yGL._SS500_

Add comment September 28th, 2009


I recommend

Linode VPS's for Rails hosting
Heroku for mindless Rails hosting
Site 5 for shared Rails hosting and all round great service

Posts by Category

Calendar

September 2009
S M T W T F S
« Aug   Nov »
 12345
6789101112
13141516171819
20212223242526
27282930  

Posts by Month