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

ruby-changes:60136

From: Nobuyoshi <ko1@a...>
Date: Thu, 20 Feb 2020 18:06:47 +0900 (JST)
Subject: [ruby-changes:60136] f5abcf767e (master): [ruby/rdoc] Removed `RDoc::Context::Section#sequence`

https://git.ruby-lang.org/ruby.git/commit/?id=f5abcf767e

From f5abcf767edcd475263ca9d8c06d0bb32a417ba9 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 13 Feb 2020 14:06:07 +0900
Subject: [ruby/rdoc] Removed `RDoc::Context::Section#sequence`

It has been deprecated since 2011.

https://github.com/ruby/rdoc/commit/5c2aa0f77d

diff --git a/lib/rdoc/context/section.rb b/lib/rdoc/context/section.rb
index 11f9cea..5fef4a9 100644
--- a/lib/rdoc/context/section.rb
+++ b/lib/rdoc/context/section.rb
@@ -34,8 +34,6 @@ class RDoc::Context::Section https://github.com/ruby/ruby/blob/trunk/lib/rdoc/context/section.rb#L34
 
   attr_reader :title
 
-  @@sequence = "SEC00000"
-
   ##
   # Creates a new section with +title+ and +comment+
 
@@ -43,9 +41,6 @@ class RDoc::Context::Section https://github.com/ruby/ruby/blob/trunk/lib/rdoc/context/section.rb#L41
     @parent = parent
     @title = title ? title.strip : title
 
-    @@sequence = @@sequence.succ
-    @sequence = @@sequence.dup
-
     @comments = []
 
     add_comment comment
@@ -233,13 +228,5 @@ class RDoc::Context::Section https://github.com/ruby/ruby/blob/trunk/lib/rdoc/context/section.rb#L228
     end
   end
 
-  ##
-  # Section sequence number (deprecated)
-
-  def sequence
-    warn "RDoc::Context::Section#sequence is deprecated, use #aref"
-    @sequence
-  end
-
 end
 
diff --git a/test/rdoc/test_rdoc_context_section.rb b/test/rdoc/test_rdoc_context_section.rb
index c520ad0..24c68c4 100644
--- a/test/rdoc/test_rdoc_context_section.rb
+++ b/test/rdoc/test_rdoc_context_section.rb
@@ -143,13 +143,5 @@ class TestRDocContextSection < RDoc::TestCase https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_context_section.rb#L143
     assert_equal doc(other_comment.parse), loaded.comments
   end
 
-  def test_sequence
-    _, err = verbose_capture_output do
-      assert_match(/\ASEC\d{5}\Z/, @s.sequence)
-    end
-
-    assert_equal "#{@S}#sequence is deprecated, use #aref\n", err
-  end
-
 end
 
-- 
cgit v0.10.2


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

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