зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
9c0cb98f28
Коммит
41f3f0eb66
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
Sat Oct 14 23:25:31 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* 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.
|
||||
|
||||
Sat Oct 14 08:15:42 2006 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* ext/digest/digest.c, ext/digest/digest.h,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
6
parse.y
6
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;
|
||||
}
|
||||
|
|
|
@ -64,13 +64,13 @@ extern void onig_null_warn(const char* s) { }
|
|||
extern void
|
||||
onig_rb_warn(const char* s)
|
||||
{
|
||||
rb_warn(s);
|
||||
rb_warn("%s", s);
|
||||
}
|
||||
|
||||
extern void
|
||||
onig_rb_warning(const char* s)
|
||||
{
|
||||
rb_warning(s);
|
||||
rb_warning("%s", s);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче