summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--ruby.c15
2 files changed, 19 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a4bb98bde9..b6f9128bcd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,12 @@
+Sat Jan 15 14:57:22 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ruby.c (proc_options): ignore trailing CRs at the end of short
+ options as well as long options. fixed: [ruby-core:04232]
+
Sat Jan 15 13:35:16 2005 Kouhei Sutou <kou@cozmixng.org>
* lib/rss/rss.rb (RSS::VERSION): 0.1.2 -> 0.1.3.
-
+
* lib/rss/rss.rb: accept inheritance. [ruby-talk:126104]
Thu Jan 13 04:48:53 2005 Tanaka Akira <akr@m17n.org>
diff --git a/ruby.c b/ruby.c
index f41196093c..10a1813d07 100644
--- a/ruby.c
+++ b/ruby.c
@@ -678,9 +678,20 @@ proc_options(argc, argv)
}
break;
+ case '\r':
+ if (!s[1]) break;
+
default:
- fprintf(stderr, "%s: invalid option -%c (-h will show valid options)\n",
- origargv[0], *s);
+ {
+ const char *format;
+ if (ISPRINT(*s)) {
+ format = "%s: invalid option -%c (-h will show valid options)\n";
+ }
+ else {
+ format = "%s: invalid option -\\%03o (-h will show valid options)\n";
+ }
+ fprintf(stderr, format, origargv[0], (int)(unsigned char)*s);
+ }
exit(2);
case 0: