Skip to content

@ripper234 /gist:965603
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
// original (broken) version is here: http://ivan-ghandhi.livejournal.com/942493.html
// My fix: don't treat arguments as if it were an array
// (Use Array.prototype.slice.call() to convert it)
function stacktrace() {
function st2(f) {
return !f ? [] :
st2(f.caller).concat([f.toString().split('(')[0].substring(9) + '(' + Array.prototype.slice.call(f.arguments).join(',') + ')']);
}
return st2(arguments.callee.caller);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.