aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-07-24 11:08:31 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-07-24 11:08:31 +0200
commitebe832dc3777861fd20e38cf7588013e9df80e0e (patch)
tree229cbf3f881bfabc282b43c7481923eb9771be99 /youtube_dl
parent825abb81759d76e53127644a45e1d6cb7ff4f654 (diff)
[jsinterp] 'reverse' modifies the array in place (fixes #3334)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/jsinterp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py
index 34e5307fa..95e6948ff 100644
--- a/youtube_dl/jsinterp.py
+++ b/youtube_dl/jsinterp.py
@@ -98,7 +98,8 @@ class JSInterpreter(object):
return argvals[0].join(obj)
if member == 'reverse':
assert len(argvals) == 0
- return obj[::-1]
+ obj.reverse()
+ return obj
if member == 'slice':
assert len(argvals) == 1
return obj[argvals[0]:]