Skip to content

Removed RDoc::Context::Section#sequence #757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions lib/rdoc/context/section.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,13 @@ class RDoc::Context::Section

attr_reader :title

@@sequence = "SEC00000"

##
# Creates a new section with +title+ and +comment+

def initialize parent, title, comment
@parent = parent
@title = title ? title.strip : title

@@sequence = @@sequence.succ
@sequence = @@sequence.dup

@comments = []

add_comment comment
Expand Down Expand Up @@ -233,13 +228,5 @@ def remove_comment comment
end
end

##
# Section sequence number (deprecated)

def sequence
warn "RDoc::Context::Section#sequence is deprecated, use #aref"
@sequence
end

end

8 changes: 0 additions & 8 deletions test/rdoc/test_rdoc_context_section.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,5 @@ def test_remove_comment_document
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