diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-18 21:40:58 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-18 21:40:58 +0000 |
commit | d1d7f12c89cf683947740727fa37b6ce7fe512d4 (patch) | |
tree | 2dca2eef347df8ff5c407d0dfea39b42e8e8b166 /test/ruby/test_comparable.rb | |
parent | 35bf7276d9f699f039619cd3da14fefb15522e59 (diff) | |
download | ruby-d1d7f12c89cf683947740727fa37b6ce7fe512d4.tar.gz |
* compar.c (cmp_equal): warn for this release and still rescue
standard exceptions for a nicer transition. See #7688.
Partly reverts r44502.
* test/ruby/test_comparable.rb: adapt assertion to match new behavior.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_comparable.rb')
-rw-r--r-- | test/ruby/test_comparable.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/test_comparable.rb b/test/ruby/test_comparable.rb index e734e8b979..05426af139 100644 --- a/test/ruby/test_comparable.rb +++ b/test/ruby/test_comparable.rb @@ -1,4 +1,5 @@ require 'test/unit' +require_relative 'envutil' class TestComparable < Test::Unit::TestCase def setup @@ -20,8 +21,9 @@ class TestComparable < Test::Unit::TestCase cmp->(x) do raise NotImplementedError, "Not a RuntimeError" end assert_raise(NotImplementedError) { @o == nil } bug7688 = '[ruby-core:51389] [Bug #7688]' - cmp->(x) do raise StandardError, "Even a standard error should not be rescued"; end - assert_raise(StandardError, bug7688) { @o == nil } + cmp->(x) do raise StandardError, "A standard error should be rescued"; end + warn = /Comparable#== will no more rescue exceptions .+ in the next release/ + assert_warn(warn, bug7688) { @o == nil } end def test_gt |