diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-09-09 23:23:14 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-09-11 02:09:23 +0900 |
commit | 274113311883bf395d4970da97bd6b597eae705e (patch) | |
tree | abaa6250bfad7a041ac329e75c1160259a037dc9 /eval_intern.h | |
parent | 3bb183188d5ee8adee9ac36f7983853dc2f1a836 (diff) | |
download | ruby-274113311883bf395d4970da97bd6b597eae705e.tar.gz |
eval_intern.h: make TH_PUSH_TAG() initialize rb_vm_tag::tag with Qundeftopic/fix-throw-false
* eval_intern.h (TH_PUSH_TAG): initialize rb_vm_tag::tag with Qundef
rather than 0 which is equal to Qfalse. Since Kernel#throw(obj)
searches a tag with rb_vm_tag::tag == obj, throw(false) can find
an unrelated tag which is not created by Kernel#catch.
Diffstat (limited to 'eval_intern.h')
-rw-r--r-- | eval_intern.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/eval_intern.h b/eval_intern.h index 9db0fd1bdb..c5210b14de 100644 --- a/eval_intern.h +++ b/eval_intern.h @@ -131,7 +131,7 @@ LONG WINAPI rb_w32_stack_overflow_handler(struct _EXCEPTION_POINTERS *); #define TH_PUSH_TAG(th) do { \ rb_thread_t * const _th = (th); \ struct rb_vm_tag _tag; \ - _tag.tag = 0; \ + _tag.tag = Qundef; \ _tag.prev = _th->tag; #define TH_POP_TAG() \ |