lib/nydp/builtin/ensuring.rb in nydp-0.1.15 vs lib/nydp/builtin/ensuring.rb in nydp-0.2.0
- old
+ new
@@ -1,20 +1,20 @@
require "nydp/vm"
class Nydp::Builtin::Ensuring
- include Nydp::Helper, Nydp::Builtin::Base
+ include Nydp::Helper, Nydp::Builtin::Base, Singleton
class InvokeProtection
include Nydp::VM::Finally
attr_reader :protection
def initialize protection
@protection = protection
end
def execute vm
- protection.invoke vm, Nydp.NIL
+ protection.invoke vm, Nydp::NIL
end
end
def builtin_invoke vm, args
fn_ensure = args.car
@@ -22,8 +22,8 @@
protection_instructions = Nydp::Pair.from_list [InvokeProtection.new(fn_ensure), Nydp::PopArg]
vm.instructions.push protection_instructions
vm.contexts.push vm.current_context
- fn_tricky.invoke vm, Nydp.NIL
+ fn_tricky.invoke vm, Nydp::NIL
end
end