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

September 28th, 2009

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_

Entry Filed under: Uncategorized, ruby

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

February 2012
S M T W T F S
« May    
 1234
567891011
12131415161718
19202122232425
26272829  

I recommend

Linode VPS's for Rails hosting

Heroku for mindless Rails hosting

Site 5 for shared Rails hosting and all round great service

Most Recent Posts

Categories