lib/grumlin/bytecode.rb in grumlin-0.11.0 vs lib/grumlin/bytecode.rb in grumlin-0.12.0

- old
+ new

@@ -36,13 +36,13 @@ # Serializes step or a step argument to either an executable query or a human readable string representation # depending on the `serialization_method` parameter. I should be either `:to_readable_bytecode` for human readable # representation or `:to_bytecode` for query. def serialize_arg(arg, serialization_method: :to_bytecode) - return arg.send(serialization_method) if arg.respond_to?(:to_bytecode) + return arg.send(serialization_method) if arg.respond_to?(serialization_method) return arg unless arg.is_a?(AnonymousStep) - arg.args.flatten.each.with_object([arg.name]) do |a, res| + arg.args.flatten.each.with_object([arg.name.to_s]) do |a, res| res << if a.instance_of?(AnonymousStep) a.bytecode.send(serialization_method) else serialize_arg(a, serialization_method: serialization_method) end