diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-31 16:04:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-31 16:04:11 +0000 |
commit | d64a9753968e793e23f03c6b5de31d300e4bd438 (patch) | |
tree | 6fa226540c93aa0199ebb8c6bc79abf9690333d1 /ruby.c | |
parent | 6cb161a66c014db83c62ebf8a0d6beff60f44382 (diff) | |
download | ruby-d64a9753968e793e23f03c6b5de31d300e4bd438.tar.gz |
* ruby.c (process_options): rejects dummy encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) |