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

ruby-changes:5659

From: naruse <ko1@a...>
Date: Sun, 15 Jun 2008 18:46:51 +0900 (JST)
Subject: [ruby-changes:5659] Ruby:r17166 (trunk): * ext/syck/rubyext.c (yaml_org_handler): associate encoding.

naruse	2008-06-15 18:42:32 +0900 (Sun, 15 Jun 2008)

  New Revision: 17166

  Modified files:
    trunk/ChangeLog
    trunk/ext/syck/rubyext.c

  Log:
    * ext/syck/rubyext.c (yaml_org_handler): associate encoding.
    
    * ext/syck/rubyext.c (syck_genericresolver_node_import): ditto.

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17166&r2=17165&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/syck/rubyext.c?r1=17166&r2=17165&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 17165)
+++ ChangeLog	(revision 17166)
@@ -1,3 +1,9 @@
+Sun Jun 15 18:40:35 2008  NARUSE, Yui  <naruse@r...>
+
+	* ext/syck/rubyext.c (yaml_org_handler): associate encoding.
+
+	* ext/syck/rubyext.c (syck_genericresolver_node_import): ditto.
+
 Sun Jun 15 18:17:03 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* vm_core.h (rb_vm_t), vm.c (rb_vm_mark): moved preallocated special
Index: ext/syck/rubyext.c
===================================================================
--- ext/syck/rubyext.c	(revision 17165)
+++ ext/syck/rubyext.c	(revision 17166)
@@ -511,6 +511,7 @@
             else if ( strcmp( type_id, "str" ) == 0 )
             {
                 obj = rb_str_new( n->data.str->ptr, n->data.str->len );
+                rb_enc_associate(obj, rb_utf8_encoding());
             }
             else
             {
@@ -1237,6 +1238,7 @@
         case syck_str_kind:
         {
             v = rb_str_new( n->data.str->ptr, n->data.str->len );
+	    rb_enc_associate(v, rb_utf8_encoding());
             if ( n->data.str->style == scalar_1quote )
             {
                 style = sym_1quote;

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

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