diff options
| author | Beoran <[email protected]> | 2012-10-09 21:45:41 +0200 |
|---|---|---|
| committer | Beoran <[email protected]> | 2012-10-09 21:45:41 +0200 |
| commit | 8949e3c7fb964e58d1666e9dba20c575e553b479 (patch) | |
| tree | ed077661499d65848891b3f6581933837695472b /test | |
| parent | cf2bd3469a08ac20cffa62fe00c54fd69844fcfa (diff) | |
| download | mruby-8949e3c7fb964e58d1666e9dba20c575e553b479.tar.gz mruby-8949e3c7fb964e58d1666e9dba20c575e553b479.zip | |
Bugfix for crash if main was extended with a module.
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/kernel.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/t/kernel.rb b/test/t/kernel.rb index fb0aee310..5caa3d7ac 100644 --- a/test/t/kernel.rb +++ b/test/t/kernel.rb @@ -204,6 +204,16 @@ assert('Kernel#extend', '15.3.1.3.13') do a.respond_to?(:test_method) == true && b.respond_to?(:test_method) == false end +assert('Kernel#extend works on toplevel', '15.3.1.3.13') do + module Test4ExtendModule + def test_method; end + end + # This would crash... + extend(Test4ExtendModule) + + respond_to?(:test_method) == true +end + assert('Kernel#global_variables', '15.3.1.3.14') do global_variables.class == Array end |
