Commit 9cd71916 authored by Carson McDonald's avatar Carson McDonald

Test coverage of extending stack and overflow

parent 3911a052
......@@ -438,3 +438,15 @@ assert('Kernel#respond_to_missing?') do
assert_true Test4RespondToMissing.new.respond_to?(:a_method)
assert_false Test4RespondToMissing.new.respond_to?(:no_method)
end
assert('stack extend') do
def recurse(count, stop)
return count if count > stop
recurse(count+1, stop)
end
assert_equal 61, recurse(0, 60)
assert_raise RuntimeError do
recurse(0, 100000)
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment