mruby/mruby — pull request #582 by skandhas (2012-12-03 07:07:20+00:00)
Title: add check_const_name for Module#const_defined?/const_get/const_set

*Module#const_defined?*, *Module#const_get* and *Module#const_set* these methods didn't check name for constant variable, so, it'll cause some problem.
Example:
```ruby
class A
CONST1 = 10
@iv = 1
@@cv= 2
end
```
Test in ruby 1.9.x's irb
```ruby
A.const_defined? :CONST1 # => ture
A.const_defined? :@iv # => NameError: wrong constant name @iv
A.const_defined? :@@cv # => NameError: wrong constant name @@cv
A.const_get :@iv # => NameError: wrong constant name @iv
A.const_get :@@cv # => NameError: wrong constant name @@cv
A.const_set :@iv, 100 # => NameError: wrong constant name @iv
```

Test in ruby mruby's mirb
```ruby
A.const_defined? :CONST1 # => ture
A.const_defined? :@iv # => true
A.const_defined? :@@cv # => true
A.const_get :@iv # => 1
A.const_get :@@cv # => 2
A.const_set :@iv, 100 # => 100
```