aboutsummaryrefslogtreecommitdiffstats
path: root/test/-ext-
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-19 16:54:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-19 16:54:08 +0000
commit4010448770965a9f5423da270337f52931aa3e74 (patch)
tree2e2a03fb208edb4067735105ccc9f1dfa8636292 /test/-ext-
parent88afcb09beae9807fd4c763020b16bff16b3c6b4 (diff)
downloadruby-4010448770965a9f5423da270337f52931aa3e74.tar.gz
object.c: fix error message
* object.c (rb_mod_const_get): make error message at uninterned string consistent with symbols. [ruby-dev:49498] [Bug #12089] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-')
-rw-r--r--test/-ext-/symbol/test_inadvertent_creation.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/-ext-/symbol/test_inadvertent_creation.rb b/test/-ext-/symbol/test_inadvertent_creation.rb
index 073952fae3..5d3906a40b 100644
--- a/test/-ext-/symbol/test_inadvertent_creation.rb
+++ b/test/-ext-/symbol/test_inadvertent_creation.rb
@@ -54,6 +54,14 @@ module Test_Symbol
assert_not_interned_error(cl, :const_get, name.to_sym)
end
+ def test_module_const_get_toplevel
+ bug12089 = '[ruby-dev:49498] [Bug #12089]'
+ name = noninterned_name("A")
+ e = assert_not_interned_error(Object, :const_get, name)
+ assert_equal(name, e.name)
+ assert_not_match(/Object::/, e.message, bug12089)
+ end
+
def test_module_const_defined?
cl = Class.new
name = noninterned_name("A")