ruby-changes:4064
From: ko1@a...
Date: Wed, 20 Feb 2008 19:45:01 +0900 (JST)
Subject: [ruby-changes:4064] naruse - Ruby:r15554 (trunk): * encoding.c (rb_enc_associate_index): doesn't clear coderange
naruse 2008-02-20 19:44:28 +0900 (Wed, 20 Feb 2008)
New Revision: 15554
Modified files:
trunk/ChangeLog
trunk/encoding.c
Log:
* encoding.c (rb_enc_associate_index): doesn't clear coderange
when new encoding equals to old one.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15554&r2=15553&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/encoding.c?r1=15554&r2=15553&diff_format=u
Index: encoding.c
===================================================================
--- encoding.c (revision 15553)
+++ encoding.c (revision 15554)
@@ -613,6 +613,8 @@
rb_enc_associate_index(VALUE obj, int idx)
{
enc_check_capable(obj);
+ if (rb_enc_get_index(obj) == idx)
+ return;
if (!ENC_CODERANGE_ASCIIONLY(obj) ||
!rb_enc_asciicompat(rb_enc_from_index(idx))) {
ENC_CODERANGE_CLEAR(obj);
Index: ChangeLog
===================================================================
--- ChangeLog (revision 15553)
+++ ChangeLog (revision 15554)
@@ -1,3 +1,8 @@
+Wed Feb 20 19:42:03 2008 NARUSE, Yui <naruse@r...>
+
+ * encoding.c (rb_enc_associate_index): doesn't clear coderange
+ when new encoding equals to old one.
+
Wed Feb 20 19:15:38 2008 NARUSE, Yui <naruse@r...>
* string.c (rb_enc_str_copy): added for wrapper for rb_enc_copy.
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/