lib/delorean/engine.rb in delorean_lang-0.5.3 vs lib/delorean/engine.rb in delorean_lang-0.5.4

- old
+ new

@@ -191,13 +191,12 @@ klass = @m.module_eval(class_name) rescue NoMethodError, NameError err(UndefinedError, "Can't find class: #{class_name}") end - err(UndefinedError, "Access to non-class: #{class_name}") unless - klass.instance_of?(Class) + return klass if klass.instance_of?(Class) || klass.instance_of?(Module) - klass + err(UndefinedError, "Access to non-class/module: #{class_name}") end def err(exc, msg) raise exc.new(msg, @module_name, curr_line) end