summaryrefslogtreecommitdiff
path: root/test/-ext-
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-30 14:44:06 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-30 14:44:06 +0000
commitf6f453438242fe724dcf0d2d5c968a5861820848 (patch)
tree94f126d2bbcff152fb05711ba9a4a9ce1f4c07e0 /test/-ext-
parented73a902b80cec1bc42465fba4a07b8a6503e6ab (diff)
* variable.c (rb_path2class): don't raise NameError when the middle
constant of the path is not defined but defined on toplevel. [ruby-core:41410] [Bug #5691] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-')
-rw-r--r--test/-ext-/path_to_class/test_path_to_class.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/-ext-/path_to_class/test_path_to_class.rb b/test/-ext-/path_to_class/test_path_to_class.rb
new file mode 100644
index 00000000000..fdf4097fde1
--- /dev/null
+++ b/test/-ext-/path_to_class/test_path_to_class.rb
@@ -0,0 +1,12 @@
+require 'test/unit'
+
+class Test_PathToClass < Test::Unit::TestCase
+ require '-test-/path_to_class/path_to_class'
+
+ def test_path_to_class
+ bug5691 = '[ruby-core:41410]'
+ assert_raise(ArgumentError, bug5691) {
+ Test_PathToClass.path_to_class("Test_PathToClass::Object")
+ }
+ end
+end