зеркало из https://github.com/github/ruby.git
* eval.c (rb_interrupt): trick to suppress GCC warning.
* sprintf.c (rb_str_format): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a056546f0d
Коммит
982450e24f
|
@ -1,3 +1,9 @@
|
|||
Tue Jul 1 20:55:07 2008 URABE Shyouhei <shyouhei@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_interrupt): trick to suppress GCC warning.
|
||||
|
||||
* sprintf.c (rb_str_format): ditto.
|
||||
|
||||
Tue Jul 1 20:44:36 2008 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* tool/instruction.rb: RubyVM is not module.
|
||||
|
|
3
eval.c
3
eval.c
|
@ -435,8 +435,7 @@ rb_exc_fatal(VALUE mesg)
|
|||
void
|
||||
rb_interrupt(void)
|
||||
{
|
||||
static const char fmt[1] = {'\0'};
|
||||
rb_raise(rb_eInterrupt, fmt);
|
||||
rb_raise(rb_eInterrupt, "%s", "");
|
||||
}
|
||||
|
||||
static VALUE get_errinfo(void);
|
||||
|
|
|
@ -979,8 +979,8 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
|
|||
*/
|
||||
if (posarg >= 0 && nextarg < argc) {
|
||||
const char *mesg = "too many arguments for format string";
|
||||
if (RTEST(ruby_debug)) rb_raise(rb_eArgError, mesg);
|
||||
if (RTEST(ruby_verbose)) rb_warn(mesg);
|
||||
if (RTEST(ruby_debug)) rb_raise(rb_eArgError, "%s", mesg);
|
||||
if (RTEST(ruby_verbose)) rb_warn("%s", mesg);
|
||||
}
|
||||
rb_str_resize(result, blen);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче