summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--process.c4
-rw-r--r--re.c2
-rw-r--r--signal.c6
-rw-r--r--transcode.c2
-rw-r--r--vm_trace.c2
6 files changed, 21 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 5471bbe..5acf706 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/process.c b/process.c
index cd498fe..e9d1b06 100644
--- a/process.c
+++ b/process.c
@@ -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:
diff --git a/re.c b/re.c
index 869fe2e..4bf18f5 100644
--- a/re.c
+++ b/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:
diff --git a/signal.c b/signal.c
index 01f9686..bf1b5d3 100644
--- a/signal.c
+++ b/signal.c
@@ -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 5f326fd..da9b2cc 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 8008401..65a53d4 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 *