Skip to content

Instantly share code, notes, and snippets.

@SrdjanCoric
Created September 24, 2017 20:49
Show Gist options
  • Save SrdjanCoric/ce08af7fc934f775bf2a62ab8ff81ac5 to your computer and use it in GitHub Desktop.
Save SrdjanCoric/ce08af7fc934f775bf2a62ab8ff81ac5 to your computer and use it in GitHub Desktop.
a = 'name'
b = 'name'
c = 'name'
# Are these three local variables pointing to the same object?
puts a.object_id
puts b.object_id
puts c.object_id
# And when we add these two lines of code... ?
a = c
b = a
puts a.object_id
puts b.object_id
puts c.object_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment