lib/nydp/builtin/ensuring.rb in nydp-0.3.0 vs lib/nydp/builtin/ensuring.rb in nydp-0.4.0
- old
+ new
@@ -19,11 +19,10 @@
def builtin_invoke vm, args
fn_ensure = args.car
fn_tricky = args.cdr.car
protection_instructions = Nydp::Pair.from_list [InvokeProtection.new(fn_ensure), Nydp::PopArg]
- vm.instructions.push protection_instructions
- vm.contexts.push vm.current_context
+ vm.push_ctx_instructions protection_instructions
fn_tricky.invoke vm, Nydp::NIL
end
end