[前][次][番号順一覧][スレッド一覧]

ruby-changes:29885

From: nobu <ko1@a...>
Date: Sat, 13 Jul 2013 12:27:46 +0900 (JST)
Subject: [ruby-changes:29885] nobu:r41937 (trunk): encoding.c: new termlen not oldtermlen

nobu	2013-07-13 12:27:37 +0900 (Sat, 13 Jul 2013)

  New Revision: 41937

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41937

  Log:
    encoding.c: new termlen not oldtermlen
    
    * encoding.c (rb_enc_associate_index): fill new terminator length, not
      old one.

  Modified files:
    trunk/ChangeLog
    trunk/encoding.c

Index: encoding.c
===================================================================
--- encoding.c	(revision 41936)
+++ encoding.c	(revision 41937)
@@ -795,7 +795,7 @@ rb_enc_associate_index(VALUE obj, int id https://github.com/ruby/ruby/blob/trunk/encoding.c#L795
     termlen = rb_enc_mbminlen(enc);
     oldtermlen = rb_enc_mbminlen(rb_enc_from_index(oldidx));
     if (oldtermlen < termlen && RB_TYPE_P(obj, T_STRING)) {
-	rb_str_fill_terminator(obj, oldtermlen);
+	rb_str_fill_terminator(obj, termlen);
     }
     enc_set_index(obj, idx);
     return obj;
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41936)
+++ ChangeLog	(revision 41937)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Jul 13 12:27:34 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* encoding.c (rb_enc_associate_index): fill new terminator length, not
+	  old one.
+
 Sat Jul 13 12:24:24 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/win32: move from ext/dl and ext/fiddle.  since ext/extmk.rb

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]