diff options
-rw-r--r-- | object.c | 2 | ||||
-rw-r--r-- | test/ruby/test_module.rb | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -2084,7 +2084,7 @@ rb_mod_const_get(int argc, VALUE *argv, VALUE mod) } if (SYMBOL_P(name)) { - id = ID2SYM(name); + id = SYM2ID(name); if (!rb_is_const_id(id)) goto wrong_id; return RTEST(recur) ? rb_const_get(mod, id) : rb_const_get_at(mod, id); } diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 269fb15045..26dbf9a588 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -297,7 +297,7 @@ class TestModule < Test::Unit::TestCase assert_equal [:Foo, :Bar, :Baz], classes end - def test_nested_bad_class + def test_nested_get_bad_class assert_raise(TypeError) do self.class.const_get([User, 'USER', 'Foo'].join('::')) end |