aboutsummaryrefslogtreecommitdiffstats
path: root/ruby.c
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ruby.c b/ruby.c
index 72602db016..486780467b 100644
--- a/ruby.c
+++ b/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;