Browse Source

Lua : make the _bind logic work for single or multiple value arguments

Justin Donaldson 10 years ago
parent
commit
21a1c0d3ac
1 changed files with 2 additions and 1 deletions
  1. 2 1
      std/lua/Boot.hx

+ 2 - 1
std/lua/Boot.hx

@@ -60,7 +60,8 @@ class Boot {
 		else untyped f = o.hx__closures__[m];
 		if (f == null){
 			f = function(arg){
-				return m(o,lua.Table.unpack(arg));
+				return Std.is(arg,Table) ? m(o,lua.Table.unpack(arg))
+					: m(o,arg);
 			};
 			untyped o.hx__closures__[m] = f;
 		}