From 35812bbb3dfa56e9b85de1dcf9c2a31b7ee8138f Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 31 Dec 2007 16:04:11 +0000 Subject: * ruby.c (process_options): rejects dummy encoding. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ruby.c') diff --git a/ruby.c b/ruby.c index a47403eb5..bc0fdde4e 100644 --- a/ruby.c +++ b/ruby.c @@ -969,6 +969,9 @@ process_options(VALUE arg) if ((opt->enc_index = rb_enc_find_index(s)) < 0) { rb_raise(rb_eRuntimeError, "unknown encoding name - %s", s); } + else if (rb_enc_dummy_p(rb_enc_from_index(opt->enc_index))) { + rb_raise(rb_eRuntimeError, "dummy encoding is not acceptable - %s ", s); + } } if (opt->e_script) { if (opt->enc_index >= 0) -- cgit