diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | process.c | 4 | ||||
-rw-r--r-- | re.c | 2 | ||||
-rw-r--r-- | signal.c | 6 | ||||
-rw-r--r-- | transcode.c | 2 | ||||
-rw-r--r-- | vm_trace.c | 2 |
6 files changed, 21 insertions, 8 deletions
@@ -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: @@ -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; diff --git a/transcode.c b/transcode.c index 5f326fd952..da9b2cc15d 100644 --- a/transcode.c +++ b/transcode.c @@ -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"); diff --git a/vm_trace.c b/vm_trace.c index 80084019e4..65a53d4d04 100644 --- a/vm_trace.c +++ b/vm_trace.c @@ -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 * |