diff options
| author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-05-24 03:08:13 +0000 |
|---|---|---|
| committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-05-24 03:08:13 +0000 |
| commit | 7617a34661ad305ed8f6707755ff2caf26b45b8a (patch) | |
| tree | cb39b879da34d69341ae5d52476190bf9abd309a /cont.c | |
| parent | 9c5e5550ec20b2f841efd277a92ff26ebc87cec0 (diff) | |
| download | ruby-7617a34661ad305ed8f6707755ff2caf26b45b8a.tar.gz ruby-7617a34661ad305ed8f6707755ff2caf26b45b8a.tar.xz ruby-7617a34661ad305ed8f6707755ff2caf26b45b8a.zip | |
* cont.c: check across trap violation.
* eval.c, yarvcore.h: ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
| -rw-r--r-- | cont.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -270,8 +270,9 @@ rb_cont_call(int argc, VALUE *argv, VALUE contval) if (cont->saved_thread.value != th->value) { rb_raise(rb_eRuntimeError, "continuation called across threads"); } - /* TODO: check "continuation called across trap" */ - printf("--> %p\n", cont); + if (cont->saved_thread.trap_tag != th->trap_tag) { + rb_raise(rb_eRuntimeError, "continuation called across trap"); + } switch(argc) { case 0: |
