Skip to content

Commit

Permalink
Use argument forwarding in HTML4 module (#3330)
Browse files Browse the repository at this point in the history
**What problem is this PR intended to solve?**

#3323

**Have you included adequate test coverage?**

No new behavior has been added, so existing tests are sufficient.

**Does this change affect the behavior of either the C or the Java
implementations?**

No.
  • Loading branch information
flavorjones authored Nov 14, 2024
2 parents c3ae13d + bcd7cf9 commit e8d30a7
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions lib/nokogiri/html4.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@

module Nokogiri
class << self
# :call-seq:
# HTML4(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block) → Nokogiri::HTML4::Document
#
# Parse HTML. Convenience method for Nokogiri::HTML4::Document.parse
def HTML4(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block)
Nokogiri::HTML4::Document.parse(input, url, encoding, options, &block)
def HTML4(...)
Nokogiri::HTML4::Document.parse(...)
end
end

Expand All @@ -20,14 +17,14 @@ module HTML4
class << self
###
# Parse HTML. Convenience method for Nokogiri::HTML4::Document.parse
def parse(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block)
Document.parse(input, url, encoding, options, &block)
def parse(...)
Document.parse(...)
end

####
# Parse a fragment from +string+ in to a NodeSet.
def fragment(string, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block)
HTML4::DocumentFragment.parse(string, encoding, options, &block)
def fragment(...)
HTML4::DocumentFragment.parse(...)
end
end

Expand Down

0 comments on commit e8d30a7

Please sign in to comment.