Skip to content

Commit

Permalink
Remove the :mjit feature in specs
Browse files Browse the repository at this point in the history
* Use `guard_not -> { defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? } do` instead
* There is only one spec needing it currently.
* Features are being deprecated in MSpec.
  • Loading branch information
eregon committed Apr 28, 2019
1 parent 533bd04 commit 809a4d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 5 additions & 1 deletion core/io/shared/write.rb
Expand Up @@ -85,7 +85,11 @@
@r.read.should == "foo"
end

without_feature :mjit do # [ruby-core:90895] MJIT worker may leave fd open in a forked child. TODO: consider acquiring GVL from MJIT worker.
# [ruby-core:90895] MJIT worker may leave fd open in a forked child.
# For instance, MJIT creates a worker before @r.close with fork(), @r.close happens,
# and the MJIT worker keeps the pipe open until the worker execve().
# TODO: consider acquiring GVL from MJIT worker.
guard_not -> { defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? } do
it "raises Errno::EPIPE if the read end is closed and does not die from SIGPIPE" do
@r.close
-> { @w.send(@method, "foo") }.should raise_error(Errno::EPIPE, /Broken pipe/)
Expand Down
3 changes: 0 additions & 3 deletions default.mspec
Expand Up @@ -46,7 +46,4 @@ class MSpecScript
/\wSpecs?$/,
/^CS_CONST/,
]

# Enable features
MSpec.enable_feature :mjit if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
end

0 comments on commit 809a4d1

Please sign in to comment.