* process.c (rlimit_resource_type, rlimit_resource_value):

get rid of inadvertent dynamic symbol pin-down.

* re.c (match_backref_number): ditto.

* signal.c (esignal_init, rb_f_kill, trap_signm): ditto.

* transcode.c (econv_opts): ditto.

* vm_trace.c (symbol2event_flag): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ktsj 2014-07-30 13:17:45 +00:00
Родитель 00b040b8d5
Коммит 3b895e8355
6 изменённых файлов: 21 добавлений и 8 удалений

Просмотреть файл

@ -1,3 +1,16 @@
Wed Jul 30 22:10:29 2014 Kazuki Tsujimoto <kazuki@callcc.net>
* process.c (rlimit_resource_type, rlimit_resource_value):
get rid of inadvertent dynamic symbol pin-down.
* re.c (match_backref_number): ditto.
* signal.c (esignal_init, rb_f_kill, trap_signm): ditto.
* transcode.c (econv_opts): ditto.
* vm_trace.c (symbol2event_flag): ditto.
Wed Jul 30 21:29:39 2014 Masaki Suketa <masaki.suketa@nifty.ne.jp>
* ext/win32ole/win32ole.c (ole_invoke): pass WIN32OLE_RECORD variant

Просмотреть файл

@ -4529,7 +4529,7 @@ rlimit_resource_type(VALUE rtype)
switch (TYPE(rtype)) {
case T_SYMBOL:
name = rb_id2name(SYM2ID(rtype));
name = RSTRING_PTR(rb_sym2str(rtype));
break;
default:
@ -4564,7 +4564,7 @@ rlimit_resource_value(VALUE rval)
switch (TYPE(rval)) {
case T_SYMBOL:
name = rb_id2name(SYM2ID(rval));
name = RSTRING_PTR(rb_sym2str(rval));
break;
default:

2
re.c
Просмотреть файл

@ -1082,7 +1082,7 @@ match_backref_number(VALUE match, VALUE backref)
return NUM2INT(backref);
case T_SYMBOL:
name = rb_id2name(SYM2ID(backref));
name = RSTRING_PTR(rb_sym2str(backref));
break;
case T_STRING:

Просмотреть файл

@ -301,7 +301,7 @@ esignal_init(int argc, VALUE *argv, VALUE self)
}
else {
int len = sizeof(signame_prefix);
signm = SYMBOL_P(sig) ? rb_id2name(SYM2ID(sig)) : StringValuePtr(sig);
signm = SYMBOL_P(sig) ? RSTRING_PTR(rb_sym2str(sig)) : StringValuePtr(sig);
if (strncmp(signm, signame_prefix, len) == 0) {
signm += len;
len = 0;
@ -408,7 +408,7 @@ rb_f_kill(int argc, const VALUE *argv)
break;
case T_SYMBOL:
s = rb_id2name(SYM2ID(argv[0]));
s = RSTRING_PTR(rb_sym2str(argv[0]));
if (!s) rb_raise(rb_eArgError, "bad signal");
goto str_signal;
@ -1044,7 +1044,7 @@ trap_signm(VALUE vsig)
break;
case T_SYMBOL:
s = rb_id2name(SYM2ID(vsig));
s = RSTRING_PTR(rb_sym2str(vsig));
if (!s) rb_raise(rb_eArgError, "bad signal");
goto str_signal;

Просмотреть файл

@ -2463,7 +2463,7 @@ econv_opts(VALUE opt, int ecflags)
ecflags |= ECONV_XML_ATTR_CONTENT_DECORATOR|ECONV_XML_ATTR_QUOTE_DECORATOR|ECONV_UNDEF_HEX_CHARREF;
}
else if (RB_TYPE_P(v, T_SYMBOL)) {
rb_raise(rb_eArgError, "unexpected value for xml option: %s", rb_id2name(SYM2ID(v)));
rb_raise(rb_eArgError, "unexpected value for xml option: %"PRIsVALUE, rb_sym2str(v));
}
else {
rb_raise(rb_eArgError, "unexpected value for xml option");

Просмотреть файл

@ -700,7 +700,7 @@ symbol2event_flag(VALUE v)
#undef C
CONST_ID(id, "a_call"); if (sym == ID2SYM(id)) return RUBY_EVENT_CALL | RUBY_EVENT_B_CALL | RUBY_EVENT_C_CALL;
CONST_ID(id, "a_return"); if (sym == ID2SYM(id)) return RUBY_EVENT_RETURN | RUBY_EVENT_B_RETURN | RUBY_EVENT_C_RETURN;
rb_raise(rb_eArgError, "unknown event: %s", rb_id2name(SYM2ID(sym)));
rb_raise(rb_eArgError, "unknown event: %"PRIsVALUE, rb_sym2str(sym));
}
static rb_tp_t *