@@ -48,14 +48,14 @@ def self.options
4848 # Redirect for Freebase Reader
4949 #
5050 # @private
51- def self . new ( input = nil , options = { } , &block )
51+ def self . new ( input = nil , ** options , &block )
5252 klass = if options [ :freebase ]
5353 FreebaseReader
5454 else
5555 self
5656 end
5757 reader = klass . allocate
58- reader . send ( :initialize , input , options , &block )
58+ reader . send ( :initialize , input , ** options , &block )
5959 reader
6060 end
6161
@@ -82,7 +82,7 @@ def self.new(input = nil, options = {}, &block)
8282 # @option options [Boolean] :freebase (false)
8383 # Use optimized Freebase reader
8484 # @return [RDF::Turtle::Reader]
85- def initialize ( input = nil , options = { } , &block )
85+ def initialize ( input = nil , ** options , &block )
8686 super do
8787 @options = {
8888 anon_base : "b0" ,
@@ -98,7 +98,7 @@ def initialize(input = nil, options = {}, &block)
9898 log_debug ( "canonicalize" ) { canonicalize? . inspect }
9999 log_debug ( "intern" ) { intern? . inspect }
100100
101- @lexer = EBNF ::LL1 ::Lexer . new ( input , self . class . patterns , @options )
101+ @lexer = EBNF ::LL1 ::Lexer . new ( input , self . class . patterns , ** @options )
102102
103103 if block_given?
104104 case block . arity
@@ -184,14 +184,14 @@ def process_iri(iri)
184184 end
185185
186186 # Create a literal
187- def literal ( value , options = { } )
187+ def literal ( value , ** options )
188188 log_debug ( "literal" ) do
189189 "value: #{ value . inspect } , " +
190190 "options: #{ options . inspect } , " +
191191 "validate: #{ validate? . inspect } , " +
192192 "c14n?: #{ canonicalize? . inspect } "
193193 end
194- RDF ::Literal . new ( value , options . merge ( validate : validate? , canonicalize : canonicalize? ) )
194+ RDF ::Literal . new ( value , validate : validate? , canonicalize : canonicalize? , ** options )
195195 rescue ArgumentError => e
196196 error ( "Argument Error #{ e . message } " , production : :literal , token : @lexer . first )
197197 end
@@ -587,7 +587,7 @@ class SyntaxError < RDF::ReaderError
587587 # @option options [Symbol] :production (nil)
588588 # @option options [String] :token (nil)
589589 # @option options [Integer] :lineno (nil)
590- def initialize ( message , options = { } )
590+ def initialize ( message , ** options )
591591 @production = options [ :production ]
592592 @token = options [ :token ]
593593 @lineno = options [ :lineno ] || ( @token . lineno if @token . respond_to? ( :lineno ) )
0 commit comments