From 3493a66ec6d7e391f94a9ca819936a4342cc3427 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 22 Oct 2007 15:29:53 +0000 Subject: [PATCH] * ruby.c (proc_options): allow space after -E (encoding) option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ ruby.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 291d8fcf78..5db0de9827 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,10 @@ Mon Oct 22 11:03:09 2007 Nobuyoshi Nakada * include/ruby/encoding.h (rb_enc_compatible): prototype. +Mon Oct 22 19:24:33 2007 Yukihiro Matsumoto + + * ruby.c (proc_options): allow space after -E (encoding) option. + Sun Oct 21 18:29:17 2007 Nobuyoshi Nakada * encoding.c (rb_enc_default, rb_enc_primary): return pointers to diff --git a/ruby.c b/ruby.c index ffdf45a151..8b14419e76 100644 --- a/ruby.c +++ b/ruby.c @@ -689,7 +689,8 @@ proc_options(int argc, char **argv, struct cmdline_options *opt) case 'E': if (!*++s) { - rb_raise(rb_eRuntimeError, "missing argument for -E"); + s = argv[1]; + argc--, argv++; } goto encoding;