lib/grumlin/steps_serializers/bytecode.rb in grumlin-0.18.1 vs lib/grumlin/steps_serializers/bytecode.rb in grumlin-0.19.0
- old
+ new
@@ -20,10 +20,15 @@
end
private
def serialize_step(step)
- [step.name, *step.args.map { |arg| serialize_arg(arg) }, step.params.any? ? step.params : nil].compact
+ [step.name].tap do |result|
+ step.args.each do |arg|
+ result << serialize_arg(arg)
+ end
+ result << step.params if step.params.any?
+ end
end
def serialize_arg(arg)
return serialize_typed_value(arg) if arg.is_a?(TypedValue)
return serialize_predicate(arg) if arg.is_a?(Expressions::P::Predicate)