From 78900b98b31d4ac8b789315623d51313573e7b54 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 10 Jan 2008 21:13:21 +0000 Subject: * encoding.c (rb_to_encoding_index, rb_to_encoding): disallow nil. [ruby-dev:33003] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- encoding.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'encoding.c') diff --git a/encoding.c b/encoding.c index 422744478e..ec8303cfeb 100644 --- a/encoding.c +++ b/encoding.c @@ -78,7 +78,6 @@ rb_to_encoding_index(VALUE enc) { int idx; - if (NIL_P(enc)) return 0; idx = enc_check_encoding(enc); if (idx >= 0) { return idx; @@ -96,7 +95,6 @@ rb_to_encoding(VALUE enc) { int idx; - if (NIL_P(enc)) return 0; idx = enc_check_encoding(enc); if (idx >= 0) return RDATA(enc)->data; if ((idx = rb_enc_find_index(StringValueCStr(enc))) < 0) { -- cgit v1.2.3