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

July 2010
S M T W T F S
« Apr    
 123
45678910
11121314151617
18192021222324
25262728293031

Shared Rails Hosting

Most Recent Posts

Categories