diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-09 13:39:25 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-09 13:39:25 +0900 |
| commit | 5306e4716e6774db4170052eac711680b7d51aa4 (patch) | |
| tree | 97f2413aedf5f481add983aae883cc9d05201095 /test | |
| parent | 03367c19edaa906a27ee27ba0362ff6e09a0965c (diff) | |
| download | mruby-5306e4716e6774db4170052eac711680b7d51aa4.tar.gz mruby-5306e4716e6774db4170052eac711680b7d51aa4.zip | |
although I understand the intntion of 039679f1, consuming all memory in the test program is not a good idea
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/exception.rb | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/test/t/exception.rb b/test/t/exception.rb index 7ecc51fa8..d43ce8833 100644 --- a/test/t/exception.rb +++ b/test/t/exception.rb @@ -318,26 +318,3 @@ end assert('Exception#inspect without message') do Exception.new.inspect end - -# very deeply recursive function that stil returns albeit very deeply so -$test_infinite_recursion = 0 -TEST_INFINITE_RECURSION_MAX = 1000000 -def test_infinite_recursion - $test_infinite_recursion += 1 - if $test_infinite_recursion > TEST_INFINITE_RECURSION_MAX - return $test_infinite_recursion - end - test_infinite_recursion -end - -assert('Infinite recursion should result in an exception being raised') do - a = begin - test_infinite_recursion - rescue - :ok - end - # OK if an exception was caught, otherwise a number will be stored in a - a == :ok -end - - |
