lib/nydp/builtin/sym.rb in nydp-0.1.15 vs lib/nydp/builtin/sym.rb in nydp-0.2.0
- old
+ new
@@ -1,18 +1,14 @@
class Nydp::Builtin::Sym
- include Nydp::Builtin::Base
+ include Nydp::Builtin::Base, Singleton
- def initialize ns
- @ns = ns
- end
-
def builtin_invoke vm, args
arg = args.car
val = case arg.class
when Nydp::Symbol
arg
else
- Nydp::Symbol.mk arg.to_s.to_sym, @ns
+ Nydp::Symbol.mk arg.to_s.to_sym, vm.ns
end
vm.push_arg val
end
end