Fixed a tiny slicing bug

This commit is contained in:
matehat
2010-03-17 12:43:59 -04:00
parent 2bd1c3acca
commit fa6f1c2fb1
2 changed files with 2 additions and 2 deletions

View File

@@ -375,7 +375,7 @@ exports.CallNode: class CallNode extends BaseNode
if not (arg instanceof SplatNode)
prev: args[i - 1]
if i is 1 and prev[0] is '[' and prev[prev.length - 1] is ']'
args[i - 1] = "${prev[0...prev.length - 2]}, $code]"
args[i - 1] = "${prev[0...prev.length - 1]}, $code]"
continue
else if i > 1 and prev[8] is '[' and prev[prev.length - 2] is ']'
args[i - 1] = "${prev[0...prev.length - 2]}, $code])"