зеркало из https://github.com/github/ruby.git
[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:
Родитель
56d33b3ea8
Коммит
f5abcf767e
|
@ -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
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче