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

ruby-changes:4582

From: ko1@a...
Date: Fri, 18 Apr 2008 19:03:43 +0900 (JST)
Subject: [ruby-changes:4582] knu - Ruby:r16076 (ruby_1_8_7): * ext/syck/rubyext.c (syck_genericresolver_node_import): should

knu	2008-04-18 19:03:26 +0900 (Fri, 18 Apr 2008)

  New Revision: 16076

  Modified files:
    branches/ruby_1_8_7/ChangeLog
    branches/ruby_1_8_7/ext/syck/rubyext.c
    branches/ruby_1_8_7/lib/yaml/basenode.rb
    branches/ruby_1_8_7/lib/yaml/types.rb

  Log:
    * ext/syck/rubyext.c (syck_genericresolver_node_import): should
      not set instance variable "@kind" before initializing it.
      [ruby-dev:32677]
    
    * ext/syck/rubyext.c (syck_resolver_initialize,
      syck_resolver_detect_implicit, syck_emitter_emit): remove unused
      variables.
    
    * ext/syck/rubyext.c: Node#value defined twice.
    
    * lib/yaml/: several method redefinitions causing warnings.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_7/lib/yaml/basenode.rb?r1=16076&r2=16075&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_7/lib/yaml/types.rb?r1=16076&r2=16075&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_7/ChangeLog?r1=16076&r2=16075&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_7/ext/syck/rubyext.c?r1=16076&r2=16075&diff_format=u

Index: ruby_1_8_7/ext/syck/rubyext.c
===================================================================
--- ruby_1_8_7/ext/syck/rubyext.c	(revision 16075)
+++ ruby_1_8_7/ext/syck/rubyext.c	(revision 16076)
@@ -917,7 +917,6 @@
 syck_resolver_initialize( self )
     VALUE self;
 {
-    VALUE tags = rb_hash_new();
     rb_ivar_set(self, s_tags, rb_hash_new());
     return self;
 }
@@ -952,7 +951,6 @@
 syck_resolver_detect_implicit( self, val )
     VALUE self, val;
 {
-    char *type_id;
     return rb_str_new2( "" );
 }
 
@@ -1308,7 +1306,6 @@
         break;
 
         case syck_seq_kind:
-            rb_iv_set(obj, "@kind", sym_seq);
             v = rb_ary_new2( syck_seq_count( n ) );
             for ( i = 0; i < syck_seq_count( n ); i++ )
             {
@@ -1319,10 +1316,10 @@
                 style = sym_inline;
             } 
             obj = rb_funcall( cSeq, s_new, 3, t, v, style );
+            rb_iv_set(obj, "@kind", sym_seq);
         break;
 
         case syck_map_kind:
-            rb_iv_set(obj, "@kind", sym_map);
             v = rb_hash_new();
             for ( i = 0; i < syck_map_count( n ); i++ )
             {
@@ -1333,6 +1330,7 @@
                 style = sym_inline;
             } 
             obj = rb_funcall( cMap, s_new, 3, t, v, style );
+            rb_iv_set(obj, "@kind", sym_map);
         break;
     }
 
@@ -2028,7 +2026,6 @@
     VALUE self;
 {
     VALUE oid, proc;
-    char *anchor_name;
     SyckEmitter *emitter;
     struct emitter_xtra *bonus;
     SYMID symple;
@@ -2284,7 +2281,6 @@
      */
     cScalar = rb_define_class_under( rb_syck, "Scalar", cNode );
     rb_define_alloc_func( cScalar, syck_scalar_alloc );
-    rb_define_attr( cNode, "value", 1, 0 );
     rb_define_method( cScalar, "initialize", syck_scalar_initialize, 3 );
     rb_define_method( cScalar, "value=", syck_scalar_value_set, 1 );
     rb_define_method( cScalar, "style=", syck_scalar_style_set, 1 );
Index: ruby_1_8_7/ChangeLog
===================================================================
--- ruby_1_8_7/ChangeLog	(revision 16075)
+++ ruby_1_8_7/ChangeLog	(revision 16076)
@@ -1,3 +1,19 @@
+Fri Apr 18 18:56:57 2008  Akinori MUSHA  <knu@i...>
+
+	* ext/syck/rubyext.c (syck_genericresolver_node_import): should
+	  not set instance variable "@kind" before initializing it.
+	  [ruby-dev:32677]
+
+	* ext/syck/rubyext.c (syck_resolver_initialize,
+	  syck_resolver_detect_implicit, syck_emitter_emit): remove unused
+	  variables.
+
+Fri Apr 18 18:54:57 2008  Akinori MUSHA  <knu@i...>
+
+	* ext/syck/rubyext.c: Node#value defined twice.
+
+	* lib/yaml/: several method redefinitions causing warnings.
+
 Fri Apr 18 16:36:16 2008  Akinori MUSHA  <knu@i...>
 
 	* lib/rexml/node.rb (REXML::Node::indent): should initialize rv
Index: ruby_1_8_7/lib/yaml/basenode.rb
===================================================================
--- ruby_1_8_7/lib/yaml/basenode.rb	(revision 16075)
+++ ruby_1_8_7/lib/yaml/basenode.rb	(revision 16076)
@@ -184,7 +184,7 @@
         #
         def []( *key )
             if Hash === @value
-                v = @value.detect { |k,v| k.transform == key.first }
+                v = @value.detect { |k,| k.transform == key.first }
                 v[1] if v
             elsif Array === @value
                 @value.[]( *key )
Index: ruby_1_8_7/lib/yaml/types.rb
===================================================================
--- ruby_1_8_7/lib/yaml/types.rb	(revision 16075)
+++ ruby_1_8_7/lib/yaml/types.rb	(revision 16076)
@@ -10,7 +10,6 @@
     #
     class PrivateType
         def self.tag_subclasses?; false; end
-        attr_accessor :type_id, :value
         verbose, $VERBOSE = $VERBOSE, nil
         def initialize( type, val )
             @type_id = type; @value = val
@@ -28,7 +27,6 @@
     #
     class DomainType
         def self.tag_subclasses?; false; end
-        attr_accessor :domain, :type_id, :value
         verbose, $VERBOSE = $VERBOSE, nil
         def initialize( domain, type, val )
             @domain = domain; @type_id = type; @value = val

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

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