lib/grumlin/bytecode.rb in grumlin-0.15.0 vs lib/grumlin/bytecode.rb in grumlin-0.15.1
- old
+ new
@@ -12,11 +12,10 @@
NONE_STEP = NoneStep.new
def initialize(step, no_return: false)
super(type: "Bytecode")
-
@step = step
@no_return = no_return
end
def inspect
@@ -47,10 +46,10 @@
# representation or `:to_bytecode` for query.
def serialize_arg(arg, serialization_method: :to_bytecode)
return arg.public_send(serialization_method) if arg.respond_to?(serialization_method)
return arg unless arg.is_a?(AnonymousStep)
- arg.args.flatten.each.with_object([arg.name.to_s]) do |a, res|
+ arg.args.each.with_object([arg.name.to_s]) do |a, res|
res << if a.respond_to?(:bytecode)
a.bytecode.public_send(serialization_method)
else
serialize_arg(a, serialization_method: serialization_method)
end