1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@14484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2007-12-22 08:49:28 +00:00
parent bc0963a204
commit a745e619d2
2 changed files with 7 additions and 1 deletions

View file

@ -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.

View file

@ -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")));