From dd45b65a28c996ed78b1ba46169ce10303b9389e Mon Sep 17 00:00:00 2001 From: Silv3r Date: Thu, 29 Sep 2016 21:58:10 +0200 Subject: [PATCH] Pass the module name as a parameter to modules loaded with require --- src/MoonSharp.Interpreter/CoreLib/LoadModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MoonSharp.Interpreter/CoreLib/LoadModule.cs b/src/MoonSharp.Interpreter/CoreLib/LoadModule.cs index c9b93510..ec5d82a7 100644 --- a/src/MoonSharp.Interpreter/CoreLib/LoadModule.cs +++ b/src/MoonSharp.Interpreter/CoreLib/LoadModule.cs @@ -231,7 +231,7 @@ public static DynValue __require_clr_impl(ScriptExecutionContext executionContex local func = __require_clr_impl(modulename); - local res = func(); + local res = func(modulename); package.loaded[modulename] = res;