diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-05 11:14:59 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-05 11:14:59 +0000 |
commit | d781caaf313b8649948c107bba277e5ad7307314 (patch) | |
tree | 4e4fb90e51b5c234883bc7fb4e0cbeb983e9bfa4 /test/ruby/test_comparable.rb | |
parent | 306c154c2d0010cebd600175f3f70083fc787599 (diff) | |
download | ruby-d781caaf313b8649948c107bba277e5ad7307314.tar.gz |
* compar.c (cmp_equal): remove error hiding in Comparable#==.
Comparable#== no longer rescues exceptions silently.
This was the cause of quite a couple bugs. See #7688. [EXPERIMENTAL]
* test/ruby/test_comparable.rb: adapt assertion to match new behavior.
* lib/rdoc/method_attr.rb: fix bugs discovered by this change.
* test/rdoc/test_rdoc_normal_class.rb: fix bugs in tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_comparable.rb')
-rw-r--r-- | test/ruby/test_comparable.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ruby/test_comparable.rb b/test/ruby/test_comparable.rb index 747f1e29a7..6c58e5d365 100644 --- a/test/ruby/test_comparable.rb +++ b/test/ruby/test_comparable.rb @@ -17,8 +17,9 @@ class TestComparable < Test::Unit::TestCase assert_equal(true, @o == nil) cmp->(x) do 1; end assert_equal(false, @o == nil) - cmp->(x) do raise; end - assert_equal(false, @o == nil) + bug7688 = '[ruby-core:51389] [Bug #7688]' + cmp->(x) do raise NotImplementedError; end + assert_raise(NotImplementedError, bug7688) { @o == nil } end def test_gt |