From 58281065f229f02e78d56873a21c1d2b3cc80a1c Mon Sep 17 00:00:00 2001 From: yugui Date: Thu, 25 Dec 2008 09:55:46 +0000 Subject: merges r20866 and r20968 from trunk into ruby_1_9_1. * error.c (exc_equal): duck typing equal to make it transitive. [ruby-dev:34880] -- * error.c (exc_equal): == method should not raise Exception. [ruby-dev:37519] * sample/test.rb: fix test git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sample/test.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sample') diff --git a/sample/test.rb b/sample/test.rb index 34e96204a..21656885f 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -660,10 +660,12 @@ begin raise $string end test_ok(false) -rescue - test_ok(true) if $! == $string +rescue => e + test_ok($! == e) + test_ok(e.message == $string) + test_ok(e != $string) end - + # exception in ensure clause begin begin -- cgit