do we have anything equivalent to static keyword in C? My motto is value
has to be preserved even after the function return, Global variable is
one of the way to do this, But I guess something equivalent to static
keyword would be a better solution.
Class is part of Ruby’s core. Any class you make will be an instance of
Class. As far as I know you could modify class Class but not overwrite
it, although I’d consider that rather dangerous since virtually
everything inherits from Class.
Because the implementation is written in C, not Ruby. Ruby works through
an interpreter, and the circular reference there is part of the
framework that the language works through. I don’t think it’s something
you can replicate from within Ruby, only by writing your own
interpreter. Why would you need to, anyway?
Yep this is ok, this i understood. My main focus is, how can Class be
instance of it’s own? Class.class=Class.
Can we able to create a class like that? Instance is only possible after
declaration of class, But here Class is an instance of Class as well.
How it’s possible?