diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-19 08:02:03 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-19 08:02:03 +0000 |
commit | 9bd91ea3b00d896c65b94c44e4ed523353a81000 (patch) | |
tree | fbe57605f0245f4a98f21a4b822fbbdc79fc69b6 | |
parent | 66417115a2596a8e43d18b2945a629353756a8f7 (diff) |
* eval.c (errinfo_place): skip if error is Fixnum. [ruby-dev:32608]
* bootstraptest/test_exception.rb, test_known_bug.rb: move fixed bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | bootstraptest/test_exception.rb | 17 | ||||
-rw-r--r-- | bootstraptest/test_knownbug.rb | 17 | ||||
-rw-r--r-- | eval.c | 3 |
4 files changed, 25 insertions, 18 deletions
@@ -1,3 +1,9 @@ +Wed Dec 19 16:59:55 2007 Koichi Sasada <ko1@atdot.net> + + * eval.c (errinfo_place): skip if error is Fixnum. [ruby-dev:32608] + + * bootstraptest/test_exception.rb, test_known_bug.rb: move fixed bug. + Wed Dec 19 16:31:58 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * parse.y (reg_named_capture_assign_iter): remove C99 dependency. diff --git a/bootstraptest/test_exception.rb b/bootstraptest/test_exception.rb index eb2c309053..bd3d02ade3 100644 --- a/bootstraptest/test_exception.rb +++ b/bootstraptest/test_exception.rb @@ -385,3 +385,20 @@ assert_match /undefined method `foo\'/, %q{ C.new.foo }, "[ruby-dev:31407]" +assert_equal 'nil', %q{ + doit = false + exc = nil + t = Thread.new { + begin + doit = true + sleep 10 + ensure + exc = $! + end + } + Thread.pass until doit + t.kill + t.join + exc.inspect +}, '[ruby-dev:32608]' + diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index 345e5c68df..c50377ac59 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -190,23 +190,6 @@ assert_normal_exit %q{ Thread.new { GC.start }.join }, '[ruby-dev:32604]' -assert_equal 'nil', %q{ - doit = false - exc = nil - t = Thread.new { - begin - doit = true - sleep 10 - ensure - exc = $! - end - } - Thread.pass until doit - t.kill - t.join - exc.inspect -}, '[ruby-dev:32608]' - assert_equal 'true', %q{ "abc".sub(/b/, "\xa1\xa1".force_encoding("euc-jp")) == "a\xa1\xa1c".force_encoding("euc-jp") @@ -2508,7 +2508,8 @@ errinfo_place(void) return &cfp->dfp[-1]; } else if (cfp->iseq->type == ISEQ_TYPE_ENSURE && - TYPE(cfp->dfp[-1]) != T_NODE) { + TYPE(cfp->dfp[-1]) != T_NODE && + !FIXNUM_P(cfp->dfp[-1])) { return &cfp->dfp[-1]; } } |