avm1: Array.reverse should return itself

This commit is contained in:
Mike Welsh 2020-11-22 12:59:56 -08:00
parent 7ac53be24f
commit d9ac9fa076
4 changed files with 7 additions and 1 deletions

View File

@ -256,7 +256,8 @@ pub fn reverse<'gc>(
this.set_array_element(i, values.pop().unwrap(), activation.context.gc_context);
}
Ok(Value::Undefined)
// Some docs incorrectly say reverse returns Void.
Ok(this.into())
}
pub fn join<'gc>(

View File

@ -86,6 +86,11 @@ b
// array
b,a,c
// array = array.reverse(); array = array.reverse();
// array
b,a,c
// array.join(" / ")
b / a / c