summaryrefslogtreecommitdiff
path: root/spec/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby')
-rw-r--r--spec/ruby/core/integer/left_shift_spec.rb2
-rw-r--r--spec/ruby/core/integer/right_shift_spec.rb2
-rw-r--r--spec/ruby/spec_helper.rb4
3 files changed, 6 insertions, 2 deletions
diff --git a/spec/ruby/core/integer/left_shift_spec.rb b/spec/ruby/core/integer/left_shift_spec.rb
index 6774e1f3e1..9e57631a1c 100644
--- a/spec/ruby/core/integer/left_shift_spec.rb
+++ b/spec/ruby/core/integer/left_shift_spec.rb
@@ -191,7 +191,7 @@ describe "Integer#<< (with n << m)" do
(0 << bignum_value).should == 0
end
- ruby_bug "#18518", ""..."3.4" do
+ with_feature(:no_memory_error, :infinite_memory) do
it "raises NoMemoryError when m > 0 and n != 0" do
coerce_long = mock("long")
coerce_long.stub!(:to_int).and_return(2**40)
diff --git a/spec/ruby/core/integer/right_shift_spec.rb b/spec/ruby/core/integer/right_shift_spec.rb
index 3fef09a30a..37246456df 100644
--- a/spec/ruby/core/integer/right_shift_spec.rb
+++ b/spec/ruby/core/integer/right_shift_spec.rb
@@ -213,7 +213,7 @@ describe "Integer#>> (with n >> m)" do
(0 >> -bignum_value).should == 0
end
- ruby_bug "#18518", ""..."3.4" do
+ with_feature(:no_memory_error, :infinite_memory) do
it "raises NoMemoryError when m < 0 and n != 0" do
coerce_long = mock("long")
coerce_long.stub!(:to_int).and_return(-(2**40))
diff --git a/spec/ruby/spec_helper.rb b/spec/ruby/spec_helper.rb
index 3404521c03..527ed4e3a2 100644
--- a/spec/ruby/spec_helper.rb
+++ b/spec/ruby/spec_helper.rb
@@ -14,6 +14,10 @@ else
end
end
+unless GC::INTERNAL_CONSTANTS[:RB_BUG_INSTEAD_OF_RB_MEMERROR]
+ MSpec.enable_feature :no_memory_error
+end
+
unless ENV['MSPEC_RUNNER'] # Running directly with ruby some_spec.rb
mspec_lib = File.expand_path("../../mspec/lib", __FILE__)
$LOAD_PATH << mspec_lib if File.directory?(mspec_lib)