Skip to content

Bug: Syntax error in Resources#empty? (resources.rb:61) #64

Description

@ronaldtse

Bug: Syntax error in Resources#empty? method

lib/pdfrb/model/type/resources.rb:61 has a syntax error that prevents the file from loading:

# Current (broken):
value[k].nil? || (value[k].is_a?(String) || .is_a?(Array) && value[k].empty?)

The .is_a? has no receiver before the dot. Should be:

# Fixed:
value[k].nil? || (value[k].is_a?(Array) && value[k].empty?)

Impact

Any code that triggers the Resources type autoload crashes with SyntaxError. This affects every Pdfrb::Document.new call when the type is eagerly loaded.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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