mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
vm_eval.c: make dsym
* vm_eval.c (rb_throw, rb_catch): get rid of making static IDs, use dynamic symbos instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
51964bf995
commit
4c6dd77df5
1 changed files with 2 additions and 2 deletions
|
@ -1904,7 +1904,7 @@ rb_throw_obj(VALUE tag, VALUE value)
|
|||
void
|
||||
rb_throw(const char *tag, VALUE val)
|
||||
{
|
||||
rb_throw_obj(ID2SYM(rb_intern(tag)), val);
|
||||
rb_throw_obj(rb_sym_intern_ascii_cstr(tag), val);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
|
@ -1981,7 +1981,7 @@ rb_f_catch(int argc, VALUE *argv)
|
|||
VALUE
|
||||
rb_catch(const char *tag, VALUE (*func)(), VALUE data)
|
||||
{
|
||||
VALUE vtag = tag ? ID2SYM(rb_intern(tag)) : rb_obj_alloc(rb_cObject);
|
||||
VALUE vtag = tag ? rb_sym_intern_ascii_cstr(tag) : rb_obj_alloc(rb_cObject);
|
||||
return rb_catch_obj(vtag, func, data);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue