Skip to content

Instantly share code, notes, and snippets.

@RobertFischer
Created August 27, 2012 18:45
Show Gist options
  • Save RobertFischer/3491256 to your computer and use it in GitHub Desktop.
Save RobertFischer/3491256 to your computer and use it in GitHub Desktop.
Ruby Ain't Functional, So Freezing Doesn't Propagate
x = ["abc"].freeze
x[0][0] = "xyz"
puts x[0] # "xyzbc"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment