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

ruby-changes:3023

From: ko1@a...
Date: 23 Dec 2007 16:13:22 +0900
Subject: [ruby-changes:3023] drbrain - Ruby:r14515 (trunk): Fix 1.9 warnings in RDoc

drbrain	2007-12-23 16:13:09 +0900 (Sun, 23 Dec 2007)

  New Revision: 14515

  Modified files:
    trunk/ChangeLog
    trunk/lib/rdoc/code_objects.rb
    trunk/lib/rdoc/diagram.rb
    trunk/lib/rdoc/parsers/parse_c.rb
    trunk/lib/rdoc/parsers/parse_rb.rb
    trunk/lib/rdoc/ri/ri_paths.rb

  Log:
    Fix 1.9 warnings in RDoc

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/rdoc/parsers/parse_rb.rb?r1=14515&r2=14514
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14515&r2=14514
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/rdoc/ri/ri_paths.rb?r1=14515&r2=14514
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/rdoc/code_objects.rb?r1=14515&r2=14514
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/rdoc/diagram.rb?r1=14515&r2=14514
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/rdoc/parsers/parse_c.rb?r1=14515&r2=14514

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 14514)
+++ ChangeLog	(revision 14515)
@@ -1,3 +1,7 @@
+Sun Dec 23 16:12:40 2007  Eric Hodel  <drbrain@s...>
+
+	* lib/rdoc:  Fix 1.9 warnings.
+
 Sun Dec 23 15:28:37 2007  Eric Hodel  <drbrain@s...>
 
 	* lib/rubygems, test/rubygems:  Fix new 1.9 warnings.
Index: lib/rdoc/parsers/parse_rb.rb
===================================================================
--- lib/rdoc/parsers/parse_rb.rb	(revision 14514)
+++ lib/rdoc/parsers/parse_rb.rb	(revision 14515)
@@ -38,7 +38,7 @@
   
   class Token
     NO_TEXT = "??".freeze
-    attr :text
+    attr_accessor :text
 
     def initialize(line_no, char_no)
       @line_no = line_no
@@ -53,7 +53,7 @@
       self
     end
 
-    attr_reader :line_no, :char_no, :text
+    attr_reader :line_no, :char_no
   end
 
   class TkNode < Token
@@ -1934,9 +1934,8 @@
         meth.singleton = true
       else
 	unget_tk dot
-	back_tk.reverse_each do
-	  |tk|
-	  unget_tk tk
+	back_tk.reverse_each do |token|
+	  unget_tk token
 	end
 	name = name_t.name
 
Index: lib/rdoc/parsers/parse_c.rb
===================================================================
--- lib/rdoc/parsers/parse_c.rb	(revision 14514)
+++ lib/rdoc/parsers/parse_c.rb	(revision 14515)
@@ -166,7 +166,7 @@
 
   class C_Parser
 
-    attr_accessor :progress
+    attr_writer :progress
 
     extend ParserFactory
     parse_files_matching(/\.(?:([CcHh])\1?|c([+xp])\2|y)\z/)
Index: lib/rdoc/code_objects.rb
===================================================================
--- lib/rdoc/code_objects.rb	(revision 14514)
+++ lib/rdoc/code_objects.rb	(revision 14515)
@@ -126,6 +126,7 @@
         @title = title
         @@sequence.succ!
         @sequence = @@sequence.dup
+        @comment = nil
         set_comment(comment)
       end
 
@@ -385,8 +386,8 @@
           module_name = modules.shift
           result = find_module_named(module_name)
           if result
-            modules.each do |module_name|
-              result = result.find_module_named(module_name)
+            modules.each do |name|
+              result = result.find_module_named(name)
               break unless result
             end
           end
Index: lib/rdoc/diagram.rb
===================================================================
--- lib/rdoc/diagram.rb	(revision 14514)
+++ lib/rdoc/diagram.rb	(revision 14515)
@@ -140,8 +140,8 @@
       graph << m
 
       unless mod.includes.empty?
-        mod.includes.each do |m|
-          m_full_name = find_full_name(m.name, mod)
+        mod.includes.each do |inc|
+          m_full_name = find_full_name(inc.name, mod)
           if @local_names.include?(m_full_name)
             @global_graph << DOT::DOTEdge.new('from' => "#{m_full_name.gsub( /:/,'_' )}",
                                       'to' => "#{mod.full_name.gsub( /:/,'_' )}",
Index: lib/rdoc/ri/ri_paths.rb
===================================================================
--- lib/rdoc/ri/ri_paths.rb	(revision 14514)
+++ lib/rdoc/ri/ri_paths.rb	(revision 14515)
@@ -55,7 +55,7 @@
 
     def self.path(use_system, use_site, use_home, use_gems, *extra_dirs)
       path = raw_path(use_system, use_site, use_home, use_gems, *extra_dirs)
-      return path.select { |path| File.directory? path }
+      return path.select { |directory| File.directory? directory }
     end
 
     # Returns the selected documentation directories including nonexistent

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

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