Skip to content

Commit

Permalink
avm2: Remove undefined specific behavior in String.split
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepycatcoding authored and torokati44 committed Aug 18, 2023
1 parent a44546a commit cde49de
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
9 changes: 0 additions & 9 deletions core/src/avm2/globals/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use crate::avm2::QName;
use crate::avm2::{ArrayObject, ArrayStorage};
use crate::string::{AvmString, WString};
use gc_arena::GcCell;
use std::iter;

// All of these methods will be defined as both
// AS3 instance methods and methods on the `String` class prototype.
Expand Down Expand Up @@ -460,14 +459,6 @@ fn split<'gc>(
args: &[Value<'gc>],
) -> Result<Value<'gc>, Error<'gc>> {
let delimiter = args.get(0).unwrap_or(&Value::Undefined);
if matches!(delimiter, Value::Undefined) {
let this = Value::from(this);
return Ok(
ArrayObject::from_storage(activation, iter::once(this).collect())
.unwrap()
.into(),
);
}

let this = Value::from(this).coerce_to_string(activation)?;
let limit = match args.get(1).unwrap_or(&Value::Undefined) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
num_ticks = 1
known_failure = true

0 comments on commit cde49de

Please sign in to comment.