Skip to content

Commit 32791da

Browse files
committed
[GR-19834] Prevent MatchData.allocate like MRI 2.7, but still let #dup and #clone work.
PullRequest: truffleruby/1168
2 parents 76a8820 + 26e7db7 commit 32791da

File tree

9 files changed

+38
-160
lines changed

9 files changed

+38
-160
lines changed

ci.jsonnet

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ local part_definitions = {
239239
platform: {
240240
linux: {
241241
platform_name:: "Linux",
242-
"$.run.specs":: { test_spec_options: ["--excl-tag", "ci"] },
243242
"$.cap":: {
244243
normal_machine: ["linux", "amd64"],
245244
bench_machine: ["x52"] + self.normal_machine + ["no_frequency_scaling"],
@@ -253,7 +252,6 @@ local part_definitions = {
253252
},
254253
darwin: {
255254
platform_name:: "Darwin",
256-
"$.run.specs":: { test_spec_options: ["--excl-tag", "darwinCi"] },
257255
"$.cap":: {
258256
normal_machine: ["darwin_mojave", "amd64"],
259257
},
@@ -280,9 +278,10 @@ local part_definitions = {
280278

281279
run: {
282280
test_unit_tck_specs: {
283-
run+: jt(["test", "unit"]) + jt(["test", "tck"]) +
284-
jt(["test", "specs"] + self["$.run.specs"].test_spec_options),
285-
# + jt(["test", "specs", ":next"]) disabled as it's currently empty and MSpec doesn't support empty sets of files
281+
run+: jt(["test", "unit"]) +
282+
jt(["test", "tck"]) +
283+
jt(["test", "specs"]) +
284+
jt(["test", "specs", ":next"]),
286285
},
287286

288287
test_fast: {

doc/contributor/native-image.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ You can build a native build of TruffleRuby using the Native Image Tool from a
9393
source distribution using:
9494

9595
```bash
96-
$ jt build native
96+
$ jt build --env native
9797
```
9898

9999
The disadvantages of the Native Image version of TruffleRuby are:

doc/contributor/workflow.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,18 +192,18 @@ exception.
192192
When the spec is fixed the `untag` command will remove the tag and you can
193193
commit the fix and the removal of the tag.
194194

195-
## Running specs for Ruby 2.5 features
195+
## Running specs for Ruby 2.7 features
196196

197-
TruffleRuby currently targets Ruby 2.4. However, we welcome pull requests for
198-
Ruby 2.5 features as long as they don't conflict significantly with
199-
Ruby 2.4 semantics.
197+
TruffleRuby currently targets Ruby 2.6. However, we welcome pull requests for
198+
Ruby 2.7 features as long as they don't conflict significantly with
199+
Ruby 2.6 semantics.
200200

201-
It is possible to run specs for Ruby 2.5 features by setting
201+
It is possible to run specs for Ruby 2.7 features by setting
202202
`PRETEND_RUBY_VERSION`:
203203

204204
```bash
205-
# Integer#digits is introduced in 2.5
206-
$ PRETEND_RUBY_VERSION=2.5.0 jt test spec/ruby/core/integer/digits_spec.rb
205+
# File.absolute_path? is introduced in 2.7
206+
$ PRETEND_RUBY_VERSION=2.7.0 jt test spec/ruby/core/file/absolute_path_spec.rb
207207
```
208208

209209
This also works for `jt tag`/`jt untag`.

spec/truffle.mspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ class MSpecScript
9494
]
9595

9696
set :next, [
97+
"spec/ruby/core/matchdata/allocate_spec.rb",
9798
]
9899

99100
set :backtrace_filter, /mspec\//

src/main/java/org/truffleruby/builtins/CoreMethodNodeManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,8 @@ private static RubyNode transformResult(CoreMethod method, RubyNode node) {
373373
return node;
374374
}
375375

376-
private void verifyUsage(DynamicObject module, MethodDetails methodDetails, final CoreMethod method,
377-
final Visibility visibility) {
376+
private void verifyUsage(DynamicObject module, MethodDetails methodDetails, CoreMethod method,
377+
Visibility visibility) {
378378
if (method.isModuleFunction()) {
379379
if (visibility != Visibility.PUBLIC) {
380380
RubyLanguage.LOGGER

src/main/java/org/truffleruby/core/regexp/MatchDataGuards.java

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)