summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index c56efe4e08..5aa93504b0 100644
--- a/ruby.c
+++ b/ruby.c
@@ -920,7 +920,6 @@ proc_options(long argc, char **argv, struct cmdline_options *opt, int envopt)
opt->src.enc.name = rb_str_new2(enc_name);
if (!opt->ext.enc.name)
opt->ext.enc.name = opt->src.enc.name;
- rb_warn("-K%c is specified; it is for 1.8 compatibility and may cause odd behavior", rb_tolower(*s));
}
s++;
}
@@ -1277,6 +1276,9 @@ process_options(int argc, char **argv, struct cmdline_options *opt)
opt->intern.enc.name = int_enc_name;
}
+ if (opt->src.enc.name)
+ rb_warning("-K is specified; it is for 1.8 compatibility and may cause odd behavior");
+
if (opt->dump & DUMP_BIT(version)) {
ruby_show_version();
return Qtrue;