[ruby/rdoc] Removed `RDoc::Context::Section#sequence`

It has been deprecated since 2011.

https://github.com/ruby/rdoc/commit/5c2aa0f77d
This commit is contained in:
Nobuyoshi Nakada 2020-02-13 14:06:07 +09:00
Родитель 56d33b3ea8
Коммит f5abcf767e
2 изменённых файлов: 0 добавлений и 21 удалений

Просмотреть файл

@ -34,8 +34,6 @@ class RDoc::Context::Section
attr_reader :title attr_reader :title
@@sequence = "SEC00000"
## ##
# Creates a new section with +title+ and +comment+ # Creates a new section with +title+ and +comment+
@ -43,9 +41,6 @@ class RDoc::Context::Section
@parent = parent @parent = parent
@title = title ? title.strip : title @title = title ? title.strip : title
@@sequence = @@sequence.succ
@sequence = @@sequence.dup
@comments = [] @comments = []
add_comment comment add_comment comment
@ -233,13 +228,5 @@ class RDoc::Context::Section
end end
end end
##
# Section sequence number (deprecated)
def sequence
warn "RDoc::Context::Section#sequence is deprecated, use #aref"
@sequence
end
end end

Просмотреть файл

@ -143,13 +143,5 @@ class TestRDocContextSection < RDoc::TestCase
assert_equal doc(other_comment.parse), loaded.comments assert_equal doc(other_comment.parse), loaded.comments
end 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 end