@@ -122,7 +122,7 @@ def validate!
122122 # @see #each_statement
123123 # @see #enum_statement
124124 def statements ( **options )
125- Array ( enum_statement )
125+ enum_statement . to_a
126126 end
127127
128128 ##
@@ -311,7 +311,7 @@ def subjects(unique: true)
311311 unless unique
312312 enum_statement . map ( &:subject ) # TODO: optimize
313313 else
314- Array ( enum_subject )
314+ enum_subject . to_a
315315 end
316316 end
317317
@@ -376,7 +376,7 @@ def predicates(unique: true)
376376 unless unique
377377 enum_statement . map ( &:predicate ) # TODO: optimize
378378 else
379- Array ( enum_predicate )
379+ enum_predicate . to_a
380380 end
381381 end
382382
@@ -441,7 +441,7 @@ def objects(unique: true)
441441 unless unique
442442 enum_statement . map ( &:object ) # TODO: optimize
443443 else
444- Array ( enum_object )
444+ enum_object . to_a
445445 end
446446 end
447447
@@ -514,7 +514,7 @@ def terms(unique: true)
514514 flatten .
515515 compact
516516 else
517- Array ( enum_term )
517+ enum_term . to_a
518518 end
519519 end
520520
@@ -759,7 +759,7 @@ def dump(*args, **options)
759759 # @overload #to_writer
760760 # Implements #to_writer for each available instance of {RDF::Writer},
761761 # based on the writer symbol.
762- #
762+ #
763763 # @return [String]
764764 # @see {RDF::Writer.sym}
765765 def method_missing ( meth , *args )
@@ -780,7 +780,7 @@ def method_missing(meth, *args)
780780 end
781781
782782 ##
783- # @note this instantiates an writer; it could probably be done more
783+ # @note this instantiates an writer; it could probably be done more
784784 # efficiently by refactoring `RDF::Reader` and/or `RDF::Format` to expose
785785 # a list of valid format symbols.
786786 def respond_to_missing? ( name , include_private = false )
0 commit comments