summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ext/nkf/nkf.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5971645238..35af5ee6bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat Dec 22 17:45:11 2007 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * 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?
+
Sat Dec 22 17:39:03 2007 NAKAMURA Usaku <usa@ruby-lang.org>
* lib/mkmf.rb ($extmk): fixed broken condition.
diff --git a/ext/nkf/nkf.c b/ext/nkf/nkf.c
index 4f340f0b92..68f8e3f6b6 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")));