Skip to content

Instantly share code, notes, and snippets.

@misfo
Created July 23, 2012 06:03
Show Gist options
  • Select an option

  • Save misfo/3162165 to your computer and use it in GitHub Desktop.

Select an option

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
$ 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