Skip to content

Version 5.0.0 breaks in .io method #211

@vseguin

Description

@vseguin

Hello 👋

It does seem like the library has a regression with the new version.
I've seen #210 - but look at this piece of code

in XML::Document.io, the library code itself is

      def self.io(value, options = {})
        Parser.io(value, options).parse
      end

And it does seem to call this in parser.rb

      def self.io(io, base_uri: nil, encoding: nil, options: nil)
        context = XML::Parser::Context.io(io)
        context.base_uri = base_uri if base_uri
        context.encoding = encoding if encoding
        context.options = options if options
        self.new(context)
      end

Which does not respect its own interface. For context, we are using rspreadsheet, which internally calls the following

LibXML::XML::Document.io zip.get_input_stream(CONTENT_FILE_NAME)

Which does seem like it should continue working as is, and that the library itself has a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions