Skip to content

Commit

Permalink
[ruby/rdoc] Use Tempfile
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Dec 9, 2022
1 parent fa64889 commit b749bc0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/rdoc/rd/block_parser.rb
Expand Up @@ -127,19 +127,15 @@ def next_token # :nodoc:
# non-RD part begin
when /^=begin\s+(\w+)/
part = $1
=begin # not imported to RDoc
if @in_part # if in non-RD part
@part_content.push(line)
else
@in_part = part if @tree.filter[part] # if filter exists
# p "BEGIN_PART: #{@in_part}" # DEBUG
end
=end
@in_part = part
# non-RD part end
when /^=end(?:$|[\s\0\C-d\C-z])/
when /^=end/
if @in_part # if in non-RD part
=begin # not imported to RDoc
# p "END_PART: #{@in_part}" # DEBUG
# make Part-in object
part = RDoc::RD::Part.new(@part_content.join(""), @tree, "r")
Expand All @@ -158,14 +154,11 @@ def next_token # :nodoc:
end
@in_part = nil
return [:SUBTREE, subtree]
=end
end
else
=begin # not imported to RDoc
if @in_part # if in non-RD part
@part_content.push(line)
end
=end
end
end

Expand Down

0 comments on commit b749bc0

Please sign in to comment.