Skip to content

Commit

Permalink
Schema, SchemaAncestorNode #initialize + super
Browse files Browse the repository at this point in the history
fucking LAST_ARGUMENT_AS_KEYWORD_PARAMETERS
  • Loading branch information
notEthan committed Apr 20, 2023
1 parent 6eb560a commit 4f8e63e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/jsi/schema.rb
Expand Up @@ -303,6 +303,16 @@ def ensure_schema(schema, msg: "indicated object is not a schema:", reinstantiat
end
end

if Util::LAST_ARGUMENT_AS_KEYWORD_PARAMETERS
def initialize(*)
super
end
else
def initialize(*, **)
super
end
end

# the underlying JSON data used to instantiate this JSI::Schema.
# this is an alias for {Base#jsi_node_content}, named for clarity in the context of working with
# a schema.
Expand Down
10 changes: 10 additions & 0 deletions lib/jsi/schema/schema_ancestor_node.rb
Expand Up @@ -4,6 +4,16 @@ module JSI
# a node in a document which may contain a schema somewhere within is extended with SchemaAncestorNode, for
# tracking things necessary for a schema to function correctly
module Schema::SchemaAncestorNode
if Util::LAST_ARGUMENT_AS_KEYWORD_PARAMETERS
def initialize(*)
super
end
else
def initialize(*, **)
super
end
end

# the base URI used to resolve the ids of schemas at or below this JSI.
# this is always an absolute URI (with no fragment).
# this may be the absolute schema URI of a parent schema or the URI from which the document was retrieved.
Expand Down

0 comments on commit 4f8e63e

Please sign in to comment.