summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-14 14:33:10 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-14 14:33:10 +0000
commit41f3f0eb66c306d33c7c59c7ca4b199416be8196 (patch)
tree35446923bc5438f4f164d2b8593a328293834bf7 /parse.y
parent9c0cb98f28e4cebd6aa6def1785e047605c850e5 (diff)
* parse.y (parser_warning, parser_warn): some error message may
contain format specifiers. a patch from Akinori MUSHA <knu at iDaemons.org>. [ruby-dev:29657] * regparse.c (onig_rb_warning, onig_rb_warn): ditto. * ext/bigdecimal/bigdecimal.c (VpException): ditto. * ext/dl/handle.c (rb_dlhandle_initialize): ditto. * ext/gdbm/gdbm.c (rb_gdbm_fatal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/parse.y b/parse.y
index 8e6af853d5..f82c7a90a8 100644
--- a/parse.y
+++ b/parse.y
@@ -6911,7 +6911,7 @@ parser_warning(NODE *node, const char *mesg)
{
int line = ruby_sourceline;
ruby_sourceline = nd_line(node);
- rb_warning(mesg);
+ rb_warning("%s", mesg);
ruby_sourceline = line;
}
@@ -6920,7 +6920,7 @@ parser_warn(NODE *node, const char *mesg)
{
int line = ruby_sourceline;
ruby_sourceline = nd_line(node);
- rb_warn(mesg);
+ rb_warn("%s", mesg);
ruby_sourceline = line;
}
@@ -9277,7 +9277,7 @@ ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
{
StringValue(msg);
if (obj == Qundef) {
- rb_raise(rb_eArgError, RSTRING_PTR(msg));
+ rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg));
}
return Qnil;
}