summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/PluralRules/default-options-object-prototype.js
blob: fc837a2e2c49e1226c77832c53eb71693a68d197 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (C) 2017 Igalia, S. L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-initializepluralrules
description: >
  Monkey-patching Object.prototype does not change the default
  options for PluralRules as a null prototype is used.
info: |
  InitializePluralRules ( collator, locales, options )

    1. If _options_ is *undefined*, then
      1. Let _options_ be ObjectCreate(*null*).
---*/

Object.prototype.type = "ordinal";
let pluralRules = new Intl.PluralRules("en");
assert.sameValue(pluralRules.resolvedOptions().type, "cardinal");

reportCompare(0, 0);