diff options
author | Hiroshi SHIBATA <[email protected]> | 2025-01-15 11:52:40 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-01-15 16:52:56 +0900 |
commit | 86d871d29cda15810d9d60dc1b94a07e9530e0cb (patch) | |
tree | ae0fd977690197a4c82eed861527c109caade4f1 /lib/rdoc/markup/attr_span.rb | |
parent | e0be1b902549f80fcdc95e801d4d533b0fdec43b (diff) |
Migrate rdoc as bundled gems
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12577
Diffstat (limited to 'lib/rdoc/markup/attr_span.rb')
-rw-r--r-- | lib/rdoc/markup/attr_span.rb | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/lib/rdoc/markup/attr_span.rb b/lib/rdoc/markup/attr_span.rb deleted file mode 100644 index f1fabf1c3b..0000000000 --- a/lib/rdoc/markup/attr_span.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -## -# An array of attributes which parallels the characters in a string. - -class RDoc::Markup::AttrSpan - - ## - # Creates a new AttrSpan for +length+ characters - - def initialize(length, exclusive) - @attrs = Array.new(length, 0) - @exclusive = exclusive - end - - ## - # Toggles +bits+ from +start+ to +length+ - def set_attrs(start, length, bits) - updated = false - for i in start ... (start+length) - if (@exclusive & @attrs[i]) == 0 || (@exclusive & bits) != 0 - @attrs[i] |= bits - updated = true - end - end - updated - end - - ## - # Accesses flags for character +n+ - - def [](n) - @attrs[n] - end - -end |