Skip to content

Instantly share code, notes, and snippets.

@haileys

haileys/refs.rb Secret

Created December 23, 2012 14:40
Show Gist options
  • Save haileys/069aeab14a7f3907bf10 to your computer and use it in GitHub Desktop.
Save haileys/069aeab14a7f3907bf10 to your computer and use it in GitHub Desktop.
2.0.0-preview2 :001 > \$lol
=> #<Ref:0x007fad9b86ee08>
2.0.0-preview2 :002 > ref = \$lol
=> #<Ref:0x007fad9b85e030>
2.0.0-preview2 :003 > ref.value
=> nil
2.0.0-preview2 :004 > $lol = "hello"
=> "hello"
2.0.0-preview2 :005 > ref.value
=> "hello"
2.0.0-preview2 :006 > ref.value = ":D"
=> ":D"
2.0.0-preview2 :007 > $lol
=> ":D"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment