Skip to content

Commit

Permalink
[Truffle] Adding null array specialization to Array#delete.
Browse files Browse the repository at this point in the history
  • Loading branch information
bjfish committed Apr 2, 2015
1 parent 7f5ea0a commit b69d00f
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -1077,6 +1077,11 @@ public Object deleteObject(VirtualFrame frame, RubyArray array, Object value) {
return found;
}

@Specialization(guards = "isNullArray")
public Object deleteNull(VirtualFrame frame, RubyArray array, Object value) {
return nil();
}

}

@CoreMethod(names = "delete_at", required = 1, raiseIfFrozenSelf = true)
Expand Down

0 comments on commit b69d00f

Please sign in to comment.