Skip to content

Commit

Permalink
Nokogiri::XML::SAX::PushParser.new() supports keyword arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
openbl committed Nov 15, 2024
1 parent e8d30a7 commit 2ab96f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/nokogiri/xml/sax/push_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ class PushParser
###
# Create a new PushParser with +doc+ as the SAX Document, providing
# an optional +file_name+ and +encoding+
def initialize(doc = XML::SAX::Document.new, file_name = nil, encoding = "UTF-8")
def initialize(
doc = XML::SAX::Document.new,
file_name_ = nil, encoding_ = "UTF-8",
file_name: file_name_, encoding: encoding_
)
@document = doc
@encoding = encoding
@sax_parser = XML::SAX::Parser.new(doc)
Expand Down

0 comments on commit 2ab96f7

Please sign in to comment.