summaryrefslogtreecommitdiff
path: root/ext
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 /ext
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 'ext')
-rw-r--r--ext/bigdecimal/bigdecimal.c4
-rw-r--r--ext/dl/handle.c4
-rw-r--r--ext/gdbm/gdbm.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 4aa9b27192..f0e05a9799 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -2206,8 +2206,8 @@ VpException(unsigned short f, const char *str,int always)
return 0; /* 0 Means VpException() raised no exception */
raise:
- if(fatal) rb_fatal(str);
- else rb_raise(exc,str);
+ if(fatal) rb_fatal("%s", str);
+ else rb_raise(exc, "%s", str);
return 0;
}
diff --git a/ext/dl/handle.c b/ext/dl/handle.c
index 3e644465ca..24269dfd78 100644
--- a/ext/dl/handle.c
+++ b/ext/dl/handle.c
@@ -70,12 +70,12 @@ rb_dlhandle_initialize(int argc, VALUE argv[], VALUE self)
ptr = dlopen(clib, cflag);
#if defined(HAVE_DLERROR)
if( !ptr && (err = dlerror()) ){
- rb_raise(rb_eDLError, err);
+ rb_raise(rb_eDLError, "%s", err);
}
#else
if( !ptr ){
err = dlerror();
- rb_raise(rb_eDLError, err);
+ rb_raise(rb_eDLError, "%s", err);
}
#endif
Data_Get_Struct(self, struct dl_handle, dlhandle);
diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c
index c47df06ad6..7beffd2bdc 100644
--- a/ext/gdbm/gdbm.c
+++ b/ext/gdbm/gdbm.c
@@ -81,7 +81,7 @@ static VALUE rb_cGDBM, rb_eGDBMError, rb_eGDBMFatalError;
static void
rb_gdbm_fatal(char *msg)
{
- rb_raise(rb_eGDBMFatalError, msg);
+ rb_raise(rb_eGDBMFatalError, "%s", msg);
}
struct dbmdata {