diff options
| author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-14 10:53:53 +0000 |
|---|---|---|
| committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-14 10:53:53 +0000 |
| commit | ad9473d604eef2d342a5a12ebe7fdafe3260217c (patch) | |
| tree | 6f2a895bac75e382b9d4e71e1bb09f92cdafbc4b /bootstraptest | |
| parent | 4082c92ecd1f975cce3031ed602010999ca50566 (diff) | |
| download | ruby-ad9473d604eef2d342a5a12ebe7fdafe3260217c.tar.gz ruby-ad9473d604eef2d342a5a12ebe7fdafe3260217c.tar.xz ruby-ad9473d604eef2d342a5a12ebe7fdafe3260217c.zip | |
* proc.c (Init_Proc), eval.c (Init_eval), eval_intern.h: move
init place of exception_error.
* inits.c: ditto.
* eval.c (Init_eval): set exception_error#throwed_state as TAG_FATAL.
[ruby-dev:31407]
* bootstraptest/test_exception.rb: add a test for above.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
| -rw-r--r-- | bootstraptest/test_exception.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/bootstraptest/test_exception.rb b/bootstraptest/test_exception.rb index 79d7388b2..85ed94678 100644 --- a/bootstraptest/test_exception.rb +++ b/bootstraptest/test_exception.rb @@ -368,3 +368,26 @@ assert_equal %q{}, %q{ end end.call } + +## +assert_equal "ok", %q{ + $foo = "ok" + class C + def inspect + bar {} + $foo = "ng" + end + + def bar + raise + ensure + end + end + + begin + C.new.foo + rescue NoMethodError => e + $foo + end +}, "[ruby-dev:31407]" + |
