diff options
| author | cremno <[email protected]> | 2015-05-29 14:51:48 +0200 |
|---|---|---|
| committer | cremno <[email protected]> | 2015-05-29 14:58:53 +0200 |
| commit | 59ea323976557408ba1c5f694213c7a31bbb6e39 (patch) | |
| tree | 5e0b5c7cc137dce12940ab1877847efb3c788dca /test/t/module.rb | |
| parent | b05d736b49a6d3a99b7f75c74ffd9b6613c453d3 (diff) | |
| download | mruby-59ea323976557408ba1c5f694213c7a31bbb6e39.tar.gz mruby-59ea323976557408ba1c5f694213c7a31bbb6e39.zip | |
check if outer is a class or module
For modules this check didn't exist yet. Also call #inspect.
Diffstat (limited to 'test/t/module.rb')
| -rw-r--r-- | test/t/module.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/t/module.rb b/test/t/module.rb index 9852328ce..ecb969475 100644 --- a/test/t/module.rb +++ b/test/t/module.rb @@ -533,3 +533,7 @@ assert('Module#module_function') do assert_true M.respond_to?(:modfunc) end +assert('module with non-class/module outer raises TypeError') do + assert_raise(TypeError) { module 0::M1 end } + assert_raise(TypeError) { module []::M2 end } +end |
