summaryrefslogtreecommitdiff
path: root/eval_intern.h
diff options
context:
space:
mode:
authorrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-26 06:43:51 (GMT)
committerrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-26 06:43:51 (GMT)
commited5a926b1320983e6802d17d6bc7c2d6c3f52989 (patch)
tree36e6cae24675bdacb32cc7e1f1484e0893c09e88 /eval_intern.h
parent64f53f0dbfd103d3c0d5c567a849251ce6466086 (diff)
eval_intern.h: make TH_PUSH_TAG() initialize rb_vm_tag::tag with Qundef
* eval_intern.h (TH_PUSH_TAG): Initialize struct 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 accidentally find an unrelated tag which is not created by Kernel#catch. [ruby-core:77229] [Bug #12743] * test/ruby/test_exception.rb (test_throw_false): Add a test case for this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
-rw-r--r--eval_intern.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval_intern.h b/eval_intern.h
index 9db0fd1..c5210b1 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() \