Skip to content

Instantly share code, notes, and snippets.

@tuttinator
Created June 30, 2013 08:50
Show Gist options
  • Save tuttinator/5894420 to your computer and use it in GitHub Desktop.
Save tuttinator/5894420 to your computer and use it in GitHub Desktop.
Constant definition in initialize method
[2] pry(main)> class Foo
[2] pry(main)* def initialize
[2] pry(main)* BAR = "something"
[2] pry(main)* end
[2] pry(main)* end
SyntaxError: (eval):4: dynamic constant assignment
BAR = "something"
^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment