

/**
 * @param {Object}
 * @param {Array.<String>}
 */
module.exports = function(_class, _instance, mixined) {

	_instance.mixined = {};
	(mixined||[]).forEach(function(name) {
		_instance.mixined[name] = [];
	});

	_instance.mixins = function(mixins)
	{
		if (typeof arguments[0] === 'string') {
			mixins = [{}];
			mixins[0][arguments[0]] = arguments[1];

		} else {
			mixins = Array.prototype.slice.call(arguments);
		}

		mixins.forEach(function(mixin) {
			Object.keys(mixin).forEach(function(name) {
				if (name in _instance.mixined) {
					_instance.mixined[name].push(mixin[name]);

				} else if (_class.prototype[name] !== undefined) {
					throw new Error("Mixin '" + name + "' could not override function.");

				} else if (_instance[name] && typeof _instance[name] !== 'function') {
					throw new Error("Mixin '" + name + "' could not override internal property.");

				} else {
					_instance[name] = mixin[name];
				}
			}, _instance);
		}, _instance);

		return _instance;
	};
};

@@ -249,16 +249,56 @@
 ins)%0A%09%7B%0A
+%09%09var args = %5B%5D.slice.call(arguments);%0A%0A
 %09%09if (ty
@@ -305,21 +305,16 @@
 peof arg
-ument
 s%5B0%5D ===
@@ -360,21 +360,16 @@
 s%5B0%5D%5Barg
-ument
 s%5B0%5D%5D = 
@@ -371,21 +371,16 @@
 %5D%5D = arg
-ument
 s%5B1%5D;%0A%0A%09
@@ -405,45 +405,12 @@
 s = 
-Array.prototype.slice.call(arguments)
+args
 ;%0A%09%09

Fix JavaScript bug with arguments.