summaryrefslogtreecommitdiff
path: root/spec/ruby/core/process
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-06-27 21:02:36 +0200
committerBenoit Daloze <eregontp@gmail.com>2019-06-27 21:02:36 +0200
commitd80e44deec77678fe2d72f94c17b2409b3e794d5 (patch)
tree612bf2313550e0982dda452f48492cc069e1c21a /spec/ruby/core/process
parentc940397116c5aef76b1c0d05561c11d43ef596a7 (diff)
Update to ruby/spec@8d74d49
Diffstat (limited to 'spec/ruby/core/process')
-rw-r--r--spec/ruby/core/process/fixtures/clocks.rb2
-rw-r--r--spec/ruby/core/process/getrlimit_spec.rb12
-rw-r--r--spec/ruby/core/process/waitpid_spec.rb2
3 files changed, 7 insertions, 9 deletions
diff --git a/spec/ruby/core/process/fixtures/clocks.rb b/spec/ruby/core/process/fixtures/clocks.rb
index 7acc8fbd58..2b4916661c 100644
--- a/spec/ruby/core/process/fixtures/clocks.rb
+++ b/spec/ruby/core/process/fixtures/clocks.rb
@@ -11,7 +11,7 @@ module ProcessSpecs
clocks -= [:CLOCK_BOOTTIME_ALARM, :CLOCK_REALTIME_ALARM]
end
- clocks.map { |c|
+ clocks.sort.map { |c|
[c, Process.const_get(c)]
}
end
diff --git a/spec/ruby/core/process/getrlimit_spec.rb b/spec/ruby/core/process/getrlimit_spec.rb
index 0258bb3d80..d866a48186 100644
--- a/spec/ruby/core/process/getrlimit_spec.rb
+++ b/spec/ruby/core/process/getrlimit_spec.rb
@@ -41,9 +41,9 @@ platform_is_not :windows do
end
context "when passed a Symbol" do
- Process.constants.grep(/\ARLIMIT_/) do |fullname|
- short = $'
- it "coerces :#{short} into #{fullname}" do
+ it "coerces the short name into the full RLIMIT_ prefixed name" do
+ Process.constants.grep(/\ARLIMIT_/) do |fullname|
+ short = fullname[/\ARLIMIT_(.+)/, 1]
Process.getrlimit(short.to_sym).should == Process.getrlimit(Process.const_get(fullname))
end
end
@@ -54,9 +54,9 @@ platform_is_not :windows do
end
context "when passed a String" do
- Process.constants.grep(/\ARLIMIT_/) do |fullname|
- short = $'
- it "coerces '#{short}' into #{fullname}" do
+ it "coerces the short name into the full RLIMIT_ prefixed name" do
+ Process.constants.grep(/\ARLIMIT_/) do |fullname|
+ short = fullname[/\ARLIMIT_(.+)/, 1]
Process.getrlimit(short).should == Process.getrlimit(Process.const_get(fullname))
end
end
diff --git a/spec/ruby/core/process/waitpid_spec.rb b/spec/ruby/core/process/waitpid_spec.rb
index fdd6be1287..f7cf1a45a8 100644
--- a/spec/ruby/core/process/waitpid_spec.rb
+++ b/spec/ruby/core/process/waitpid_spec.rb
@@ -1,8 +1,6 @@
require_relative '../../spec_helper'
describe "Process.waitpid" do
- it "needs to be reviewed for spec completeness"
-
it "returns nil when the process has not yet completed and WNOHANG is specified" do
pid = spawn("sleep 5")
begin