[ruby/rdoc] [DOC] stop documenting fallback MatchData#match_length
Also empty document of `Object`. https://github.com/ruby/rdoc/commit/ce32a3102b
This commit is contained in:
parent
5dfeffc614
commit
32cc6301b3
@ -1,19 +1,19 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
##
|
||||
# Manages changes of attributes in a block of text
|
||||
|
||||
unless MatchData.method_defined?(:match_length)
|
||||
using Module.new {
|
||||
refine(MatchData) {
|
||||
def match_length(nth)
|
||||
b, e = offset(nth)
|
||||
e - b if b
|
||||
end
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
class RDoc::Markup::AttributeManager
|
||||
unless ::MatchData.method_defined?(:match_length)
|
||||
using ::Module.new {
|
||||
refine(::MatchData) {
|
||||
def match_length(nth) # :nodoc:
|
||||
b, e = offset(nth)
|
||||
e - b if b
|
||||
end
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
##
|
||||
# The NUL character
|
||||
|
Loading…
x
Reference in New Issue
Block a user