diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-02 08:25:00 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-02 08:25:00 +0000 |
commit | 10c4bb29b237ccdbf99cfe8ef44c81de5a4a9018 (patch) | |
tree | cb4ae14994972651eed5db1489218c1a64663990 /eval.c | |
parent | a70a430f83a725decf1826aca35ebfca791e5b54 (diff) | |
download | ruby-10c4bb29b237ccdbf99cfe8ef44c81de5a4a9018.tar.gz |
* time.c (time_load): restore instance variables (if any) before
loading from marshaled data.
* time.c (time_mdump): new marshal dumper. _dump is still
available for compatibility.
* time.c (time_mload): new marshal loader.
* marshal.c (w_object): preserve instance variables for objects
with marshal_dump.
* marshal.c (r_object0): restore instance variables before calling
marshal_load.
* error.c (rb_warn_m): always return nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -10187,7 +10187,19 @@ rb_catch(tag, func, data) VALUE (*func)(); VALUE data; { - return rb_iterate((VALUE(*)_((VALUE)))catch_i, ID2SYM(rb_intern(tag)), func, data); + int state; + VALUE val = Qnil; /* OK */ + + PUSH_TAG(PROT_NONE); + PUSH_SCOPE(); + if ((state = EXEC_TAG()) == 0) { + val = rb_iterate((VALUE(*)_((VALUE)))catch_i, ID2SYM(rb_intern(tag)), func, data); + } + POP_SCOPE(); + POP_TAG(); + if (state) JUMP_TAG(state); + + return val; } static VALUE |