summaryrefslogtreecommitdiffhomepage
path: root/test/t/class.rb
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-05-31 17:01:49 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-05-31 17:01:49 +0900
commitb720cb635ab8c13832ac57cf11d07a3d848b8bd1 (patch)
treed0329fc4951b9b4fb039bae79ecaefd90de98154 /test/t/class.rb
parentd9f191cf97f8c53e177f42d0223e80335c4b6e29 (diff)
parent59ea323976557408ba1c5f694213c7a31bbb6e39 (diff)
downloadmruby-b720cb635ab8c13832ac57cf11d07a3d848b8bd1.tar.gz
mruby-b720cb635ab8c13832ac57cf11d07a3d848b8bd1.zip
Merge pull request #2811 from cremno/check-if-outer-is-a-class-or-module
check if outer is a class or module
Diffstat (limited to 'test/t/class.rb')
-rw-r--r--test/t/class.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/t/class.rb b/test/t/class.rb
index d4ecf99d0..720fd37fa 100644
--- a/test/t/class.rb
+++ b/test/t/class.rb
@@ -383,3 +383,8 @@ assert('class variable and class << self style class method') do
assert_equal("value", ClassVariableTest.class_variable)
end
+
+assert('class with non-class/module outer raises TypeError') do
+ assert_raise(TypeError) { class 0::C1; end }
+ assert_raise(TypeError) { class []::C2; end }
+end