summaryrefslogtreecommitdiffstats
path: root/encoding.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 04:26:38 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 04:26:38 +0000
commitd8e8231c22e0c31e76a30ab86faf2723f9c6dd53 (patch)
treeb921c8618fbacd59c47fba4d80935edc41659c12 /encoding.c
parent43bc9c1ef979719fe47462e2ae9e370f65df602a (diff)
downloadruby-d8e8231c22e0c31e76a30ab86faf2723f9c6dd53.tar.gz
ruby-d8e8231c22e0c31e76a30ab86faf2723f9c6dd53.tar.xz
ruby-d8e8231c22e0c31e76a30ab86faf2723f9c6dd53.zip
* io.c (rb_io_external_encoding): new method.
* encoding.c (rb_enc_from_encoding): returns Qnil for NULL encoding. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/encoding.c b/encoding.c
index 1af3c4422..6ff8fb6aa 100644
--- a/encoding.c
+++ b/encoding.c
@@ -51,7 +51,7 @@ enc_new(rb_encoding *encoding)
VALUE
rb_enc_from_encoding(rb_encoding *encoding)
{
- if (!encoding) return 0;
+ if (!encoding) return Qnil;
if (enc_initialized_p(encoding))
return ENC_FROM_ENCODING(encoding);
return enc_new(encoding);