Hi,

I am wondering if the following is a bug or a feature (with ruby 1.8.0). The following fails:

	class A
		@@x=:a
	end

	def (o=A.new).meth
		@@x
	end

p o.meth # uninitialized class variable @@x in Object (NameError)

on the other hand, the following is ok:

	class A
		@@x=:a
	end

	class B < A
		def meth
			@@x
		end
	end

	p B.new.meth # :a


Is cvar_cbase doing the wrong thing by chaining up via nd_next when it encounters a singleton class?

Regards

Mark

----------------
Powered by telstra.com