summaryrefslogtreecommitdiff
path: root/spec/ruby/core/process/getrlimit_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/process/getrlimit_spec.rb')
-rw-r--r--spec/ruby/core/process/getrlimit_spec.rb12
1 files changed, 6 insertions, 6 deletions
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