diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-09 04:53:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-09 04:53:18 +0000 |
commit | 90c1ebbfd578419e2c3e1251b7527483f8501bc2 (patch) | |
tree | bf1a27d2a40e723f88b9a5fe1b6372d1ef144099 /test | |
parent | b203f6734434bb100bb9e7874516d7fcae47f841 (diff) | |
download | ruby-90c1ebbfd578419e2c3e1251b7527483f8501bc2.tar.gz |
compar.c: fail if recursion
* compar.c (cmp_eq): fail if recursion. [ruby-core:57736] [Bug #9003]
* thread.c (rb_exec_recursive_paired_outer): new function which is
combinnation of paired and outer variants.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_comparable.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_comparable.rb b/test/ruby/test_comparable.rb index c686adeceb..747f1e29a7 100644 --- a/test/ruby/test_comparable.rb +++ b/test/ruby/test_comparable.rb @@ -76,4 +76,11 @@ class TestComparable < Test::Unit::TestCase assert_nil(Time.new <=> "") } end + + def test_no_cmp + bug9003 = '[ruby-core:57736] [Bug #9003]' + assert_nothing_raised(SystemStackError, bug9003) { + @o <=> @o.dup + } + end end |