summaryrefslogtreecommitdiff
path: root/vm_trace.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-25 23:45:02 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-25 23:45:02 (GMT)
commit89a2fd52bd966238c63904afbb95015edc8a4351 (patch)
tree14bd3d321ddf212972a5dc84354a452cf2a885e5 /vm_trace.c
parent859f88f330ace84bdef55f5d489f3291d2d605ba (diff)
vm_trace.c: not a static variable
* vm_trace.c (symbol2event_flag): should not be static but a mere local variable, so that unnecessary race condition does not happen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_trace.c')
-rw-r--r--vm_trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_trace.c b/vm_trace.c
index 07c94b4..bc3d475 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -682,7 +682,7 @@ tp_alloc(VALUE klass)
static rb_event_flag_t
symbol2event_flag(VALUE v)
{
- static ID id;
+ ID id;
VALUE sym = rb_convert_type(v, T_SYMBOL, "Symbol", "to_sym");
#define C(name, NAME) CONST_ID(id, #name); if (sym == ID2SYM(id)) return RUBY_EVENT_##NAME