summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-14 14:34:07 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-14 14:34:07 +0000
commitf172c2768310e50a3754e53d17fe4fe78e0b93bb (patch)
tree0d48ceccf48afa1b868c199ee475a05ec1a9734f /ext
parent6d3ce79dc5a13546c4f85e15545c498b4831ea3e (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] * 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/branches/ruby_1_8@11171 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 04266b1..f10af59 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -2206,8 +2206,8 @@ VpException(unsigned short f,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 7a05115..69d47ca 100644
--- a/ext/dl/handle.c
+++ b/ext/dl/handle.c
@@ -66,12 +66,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_eRuntimeError, err);
+ rb_raise(rb_eRuntimeError, "%s", err);
}
#else
if (!ptr) {
err = dlerror();
- rb_raise(rb_eRuntimeError, err);
+ rb_raise(rb_eRuntimeError, "%s", err);
}
#endif
Data_Get_Struct(self, struct dl_handle, dlhandle);
diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c
index e49932f..82109fd 100644
--- a/ext/gdbm/gdbm.c
+++ b/ext/gdbm/gdbm.c
@@ -82,7 +82,7 @@ static void
rb_gdbm_fatal(msg)
char *msg;
{
- rb_raise(rb_eGDBMFatalError, msg);
+ rb_raise(rb_eGDBMFatalError, "%s", msg);
}
struct dbmdata {