Created
July 23, 2012 06:03
-
-
Save misfo/3162165 to your computer and use it in GitHub Desktop.
Potential Ruby 1.9.3 bug - class variables set on the wrong class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ RBENV_VERSION=1.9.3-p194 ruby -e 'p Object.class_variables; Class.new { def set() @@v = 11 end }.new.set; p Object.class_variables' | |
| [] | |
| -e:1: warning: class variable access from toplevel | |
| [:@@v] | |
| # Turns out it's was an intentional (?!?!?!) change: http://bugs.ruby-lang.org/issues/5544 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment