#306 √ resolved
farleyknight

[BUG][PATCH] Class variables not available through modules

Reported by farleyknight | February 3rd, 2008 @ 09:06 AM | in 1.0 preview

Currently class variables which have been created in a module, and then included or extended by an instance of Class, are not available. An example:


module M
   @@cvar = :cvar
end

class C; end

C.include(M)

# The cvar is found
C.class_variables => ["@@cvar"] 

# But is not accessable
C.class_variable_get("@@cvar") => # raises 'class variable not found'

C.extend(M)
C.class_variable_get("@@cvar") => # also raises 'class variable not found'

A patch is forthcoming.. Still learning git..

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Tags