Skip to content

Instantly share code, notes, and snippets.

@luckyruby
Last active August 29, 2015 13:58
Show Gist options
  • Save luckyruby/10124493 to your computer and use it in GitHub Desktop.
Save luckyruby/10124493 to your computer and use it in GitHub Desktop.
foo = %w(a b c)
=> ["a", "b", "c"]
foo.object_id
=> 2176910900
foo += ['d']
=> ["a", "b", "c", "d"]
foo.object_id
=> 2176867500
foo = %w(a b c)
=> ["a", "b", "c"]
foo.object_id
=> 2172617680
foo.concat(['d'])
=> ["a", "b", "c", "d"]
foo.object_id
=> 2172617680
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment