lib/rdf/json/reader.rb in rdf-json-2.2.0 vs lib/rdf/json/reader.rb in rdf-json-3.1.0

- old
+ new

@@ -45,11 +45,11 @@ # @param [Hash{Symbol => Object}] options # any additional options (see `RDF::Reader#initialize`) # @yield [reader] `self` # @yieldparam [RDF::Reader] reader # @yieldreturn [void] ignored - def initialize(input = $stdin, options = {}, &block) + def initialize(input = $stdin, **options, &block) super do if block_given? case block.arity when 0 then instance_eval(&block) else block.call(self) @@ -128,10 +128,10 @@ # @param [String] string # @param [Hash{Symbol => Object}] options # @option options [Boolean] :intern (false) # @return [RDF::URI] # @since 0.3.0 - def parse_uri(string, options = {}) + def parse_uri(string, **options) uri = RDF::URI.send(intern = intern? && options[:intern] ? :intern : :new, string) uri.validate! if validate? uri.canonicalize! if canonicalize? && !intern uri end