v8/test/mjsunit/regress/regress-585775.js
jgruber f3b9d570cb [regexp] Let RegExp.prototype.compile return this
ES6 requires the compile method to return this:
www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.compile

BUG=v8:5722,chromium:585775

Review-Url: https://codereview.chromium.org/2577653002
Cr-Commit-Position: refs/heads/master@{#41705}
2016-12-15 07:29:39 +00:00

7 lines
238 B
JavaScript

// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var pattern = /foo/;
assertEquals(pattern, pattern.compile(pattern));