diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-25 09:55:46 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-25 09:55:46 +0000 |
| commit | 58281065f229f02e78d56873a21c1d2b3cc80a1c (patch) | |
| tree | 33b08b6865f18ae196faa1ea3f14ddeed9aa66bf /sample | |
| parent | 3772fc484b7c48dabccaff8c002b7da7a8726b84 (diff) | |
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
Diffstat (limited to 'sample')
| -rw-r--r-- | sample/test.rb | 8 |
1 files changed, 5 insertions, 3 deletions
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 |
