зеркало из https://github.com/github/ruby.git
* ruby.c (proc_options): make rb_raise format as a string literal to
avoid warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b12bb50149
Коммит
5b57724691
|
@ -1,3 +1,8 @@
|
|||
Sat Dec 8 17:07:10 2007 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ruby.c (proc_options): make rb_raise format as a string literal to
|
||||
avoid warning.
|
||||
|
||||
Sat Dec 8 16:18:16 2007 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* re.c (rb_reg_check_preprocess): new function for validating regexp
|
||||
|
|
12
ruby.c
12
ruby.c
|
@ -856,16 +856,16 @@ proc_options(int argc, char **argv, struct cmdline_options *opt)
|
|||
|
||||
default:
|
||||
{
|
||||
const char *format;
|
||||
if (ISPRINT(*s)) {
|
||||
format =
|
||||
"invalid option -%c (-h will show valid options)";
|
||||
rb_raise(rb_eRuntimeError,
|
||||
"invalid option -%c (-h will show valid options)",
|
||||
(int)(unsigned char)*s);
|
||||
}
|
||||
else {
|
||||
format =
|
||||
"invalid option -\\%03o (-h will show valid options)";
|
||||
rb_raise(rb_eRuntimeError,
|
||||
"invalid option -\\%03o (-h will show valid options)",
|
||||
(int)(unsigned char)*s);
|
||||
}
|
||||
rb_raise(rb_eRuntimeError, format, (int)(unsigned char)*s);
|
||||
}
|
||||
goto switch_end;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче