1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2015-04-25 23:45:02 +00:00
parent 859f88f330
commit 89a2fd52bd

View file

@ -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