NASHORN-394.js revision 877:cf4d2252d444
1132718Skan/*
2132718Skan * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
3132718Skan * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4132718Skan *
5169689Skan * This code is free software; you can redistribute it and/or modify it
6132718Skan * under the terms of the GNU General Public License version 2 only, as
7132718Skan * published by the Free Software Foundation.
8132718Skan *
9132718Skan * This code is distributed in the hope that it will be useful, but WITHOUT
10132718Skan * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11132718Skan * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12132718Skan * version 2 for more details (a copy is included in the LICENSE file that
13132718Skan * accompanied this code).
14132718Skan *
15132718Skan * You should have received a copy of the GNU General Public License version
16132718Skan * 2 along with this work; if not, write to the Free Software Foundation,
17132718Skan * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18132718Skan *
19132718Skan * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20132718Skan * or visit www.oracle.com if you need additional information or have any
21169689Skan * questions.
22169689Skan */
23132718Skan
24132718Skan/*
25132718Skan * NASHORN-394 : array pop converts undefined into 0
26132718Skan *
27132718Skan * @test
28132718Skan * @run
29132718Skan */
30132718Skan
31169689Skanvar a = [];
32132718Skana.length = 2;
33132718Skanprint(a.pop());
34132718Skan
35132718Skan