From 14d6541fc130fd2d8f0034fcfd43e1ab0b125e79 Mon Sep 17 00:00:00 2001 From: rhod williams Date: Wed, 19 Dec 2012 10:33:45 +0000 Subject: [PATCH 1/2] fix arguments.slice call in step definitions. --- lib/cucumber/support_code/step_definition.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cucumber/support_code/step_definition.js b/lib/cucumber/support_code/step_definition.js index a0d9f6dfc..980eb1a26 100644 --- a/lib/cucumber/support_code/step_definition.js +++ b/lib/cucumber/support_code/step_definition.js @@ -95,7 +95,7 @@ var StepDefinition = function (pattern, code) { self.invoke = function invoke(step, world, callback) { code = function() { - var parameters = arguments.slice(0); + var parameters = Array.prototype.slice.call(arguments); var codeCallback = parameters.pop(); // Create an angular callback. Angular just executes the function, so we wrap it here so we can include any parameters. From bf469322e553d3a898944deddaef479194377d5a Mon Sep 17 00:00:00 2001 From: rhod williams Date: Wed, 19 Dec 2012 10:44:21 +0000 Subject: [PATCH 2/2] remove extra spaces --- lib/cucumber/support_code/step_definition.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cucumber/support_code/step_definition.js b/lib/cucumber/support_code/step_definition.js index 980eb1a26..34c506e75 100644 --- a/lib/cucumber/support_code/step_definition.js +++ b/lib/cucumber/support_code/step_definition.js @@ -95,7 +95,7 @@ var StepDefinition = function (pattern, code) { self.invoke = function invoke(step, world, callback) { code = function() { - var parameters = Array.prototype.slice.call(arguments); + var parameters = Array.prototype.slice.call(arguments); var codeCallback = parameters.pop(); // Create an angular callback. Angular just executes the function, so we wrap it here so we can include any parameters.