lib/moosex.rb in moosex-0.0.18 vs lib/moosex.rb in moosex-0.0.19

- old
+ new

@@ -9,10 +9,11 @@ require "moosex/types" require "moosex/exceptions" require "moosex/meta" require "moosex/core" require "moosex/attribute" +require "moosex/traits" require "weakref" module MooseX @@ALIAS = nil @@MOOSEX_WARNINGS = true @@ -63,10 +64,12 @@ class_or_module.define_singleton_method(:__moosex__meta) { meta } if @@ALIAS class_or_module.class_eval do - class_or_module.define_singleton_method(@@ALIAS) { meta } + class_or_module.define_singleton_method(@@ALIAS) do + self.__moosex__meta + end end @@ALIAS = false end end