diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rdoc/markup/attribute_manager.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/rdoc/markup/attribute_manager.rb b/lib/rdoc/markup/attribute_manager.rb index 601e6bc189..a2f866bff9 100644 --- a/lib/rdoc/markup/attribute_manager.rb +++ b/lib/rdoc/markup/attribute_manager.rb @@ -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 |