4 # deprecated in MRI 1.9
7 VERSION = Rubinius::RUBY_VERSION
8 RUBY_VERSION = Rubinius::RUBY_VERSION
9 RUBY_PATCHLEVEL = Rubinius::RUBY_PATCHLEVEL
10 RUBY_ENGINE = Rubinius::RUBY_ENGINE
11 RBX_VERSION = Rubinius::RBX_VERSION
13 ivar_as_index :__ivars__ => 0
15 def __ivars__; @__ivars__ ; end
22 def instance_variable_validate(name)
23 # adapted from rb_to_id
26 return name if name.to_s[0] == ?@
28 return name.intern if name[0] == ?@
30 raise ArgumentError.new("#{name.inspect} is not a symbol")
32 raise TypeError.new("#{name.inspect} is not a symbol") unless name.respond_to?(:to_str)
34 return name.to_sym if name[0] == ?@
37 raise NameError.new("`#{name}' is not allowed as an instance variable name")
39 private :instance_variable_validate
42 private :__find_method__
43 private :get_instance_variable
44 private :get_instance_variables
45 private :set_instance_variable