diff options
| author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-22 08:49:28 +0000 |
|---|---|---|
| committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-22 08:49:28 +0000 |
| commit | 6e06fd02918f8f5888322a8716cd795baec66db4 (patch) | |
| tree | e9dd117e370824e333244f587168351cd4649ea8 /ext | |
| parent | 5d2653e5c0693aa7cf7b17bbf48359a35ce10e55 (diff) | |
| download | ruby-6e06fd02918f8f5888322a8716cd795baec66db4.tar.gz ruby-6e06fd02918f8f5888322a8716cd795baec66db4.tar.xz ruby-6e06fd02918f8f5888322a8716cd795baec66db4.zip | |
* ext/nkf/nkf.c (Init_nkf): use rb_ascii_encoding() for
rb_nkf_enc_get("US-ASCII").
* if use rb_nkf_enc_get("US-ASCII"), ruby will crash - this is bug?
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/nkf/nkf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/nkf/nkf.c b/ext/nkf/nkf.c index 4f340f0b9..68f8e3f6b 100644 --- a/ext/nkf/nkf.c +++ b/ext/nkf/nkf.c @@ -485,7 +485,7 @@ Init_nkf() rb_define_const(mNKF, "NOCONV", Qnil); rb_define_const(mNKF, "UNKNOWN", Qnil); rb_define_const(mNKF, "BINARY", rb_enc_from_encoding(rb_nkf_enc_get("BINARY"))); - rb_define_const(mNKF, "ASCII", rb_enc_from_encoding(rb_nkf_enc_get("US-ASCII"))); + rb_define_const(mNKF, "ASCII", rb_enc_from_encoding(rb_ascii_encoding())); rb_define_const(mNKF, "JIS", rb_enc_from_encoding(rb_nkf_enc_get("ISO-2022-JP"))); rb_define_const(mNKF, "EUC", rb_enc_from_encoding(rb_nkf_enc_get("EUC-JP"))); rb_define_const(mNKF, "SJIS", rb_enc_from_encoding(rb_nkf_enc_get("Shift_JIS"))); |
