Return to Snippet

Revision: 14755
at June 10, 2009 11:02 by wdso


Initial Code
# immediate values
# e.g. true, false and Integers
a = true # => true
b = true # => true

def a.foo 
  "bar"
end

a.foo # => "bar"
b.foo # => "bar"

# referenced values
c = "foo" # => "foo"
d = "foo" # => "foo"

def c.meep
 "blubb"
end

d.meep # => undefined method

Initial URL


Initial Description
What a gotcha!

Initial Title
Be careful with immediate values

Initial Tags
ruby

Initial Language
Ruby