lib/nydp/builtin/ensuring.rb in nydp-0.0.10.1 vs lib/nydp/builtin/ensuring.rb in nydp-0.0.11
- old
+ new
@@ -1,9 +1,9 @@
require "nydp/vm"
class Nydp::Builtin::Ensuring
- include Nydp::Helper
+ include Nydp::Helper, Nydp::Builtin::Base
class InvokeProtection
include Nydp::VM::Finally
attr_reader :protection
@@ -14,10 +14,10 @@
def execute vm
protection.invoke vm, Nydp.NIL
end
end
- def invoke vm, args
+ 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.push_instructions protection_instructions, vm.peek_context