lib/rdf/query/solution.rb in rdf-1.0.5 vs lib/rdf/query/solution.rb in rdf-1.0.6

- old
+ new

@@ -23,11 +23,11 @@ class Solution # Undefine all superfluous instance methods: undef_method(*instance_methods. map(&:to_s). select {|m| m =~ /^\w+$/}. - reject {|m| %w(object_id dup instance_eval inspect to_s class).include?(m) || m[0,2] == '__'}. + reject {|m| %w(object_id dup instance_eval inspect to_s class should should_not pretty_print).include?(m) || m[0,2] == '__'}. map(&:to_sym)) include Enumerable ## @@ -143,10 +143,10 @@ # the variable name # @param [RDF::Term] value # @return [RDF::Term] # @since 0.3.0 def []=(name, value) - @bindings[name.to_sym] = value + @bindings[name.to_sym] = value.is_a?(RDF::Term) ? value : RDF::Literal(value) end ## # Merges the bindings from the given `other` query solution into this # one, overwriting any existing ones having the same name.