From b02a1ee037b51e910f760136131956dc517ad594 Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Sun, 12 Dec 2010 18:35:41 -0500 Subject: [PATCH] just fixing a single test in test_functions.coffee for now, so I don't forget my suggested fix --- test/test_functions.coffee | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/test_functions.coffee b/test/test_functions.coffee index 78ff4bfe..193839c6 100644 --- a/test/test_functions.coffee +++ b/test/test_functions.coffee @@ -369,11 +369,11 @@ new Foo().bar([101]...) eq x, 101 -# Issue #904: Destructuring function arguments with same-named variables in scope. -key for key, value of a: 1 -f = ([key, value]) -> - key + value - -eq f([10, 11]), 21 -eq key, 'a' -eq value, 1 \ No newline at end of file +test "#904: Destructuring function arguments with same-named variables in scope", -> + a = b = nonce = {} + fn = ([a,b]) -> {a:a,b:b} + result = fn([c={},d={}]) + eq c, result.a + eq d, result.b + eq nonce, a + eq nonce, b