Skip insanely memory consuming tests
These tests do not only consume hundreds GiB bytes memory, result in `rb_bug` when `RUBY_DEBUG` is enabled.
This commit is contained in:
parent
509da028c2
commit
5df7118445
3
gc.c
3
gc.c
@ -14491,6 +14491,9 @@ Init_GC(void)
|
||||
rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_SIZE")), SIZET2NUM(HEAP_PAGE_SIZE));
|
||||
rb_hash_aset(gc_constants, ID2SYM(rb_intern("SIZE_POOL_COUNT")), LONG2FIX(SIZE_POOL_COUNT));
|
||||
rb_hash_aset(gc_constants, ID2SYM(rb_intern("RVARGC_MAX_ALLOCATE_SIZE")), LONG2FIX(size_pool_slot_size(SIZE_POOL_COUNT - 1)));
|
||||
if (RB_BUG_INSTEAD_OF_RB_MEMERROR+0) {
|
||||
rb_hash_aset(gc_constants, ID2SYM(rb_intern("RB_BUG_INSTEAD_OF_RB_MEMERROR")), Qtrue);
|
||||
}
|
||||
OBJ_FREEZE(gc_constants);
|
||||
/* internal constants */
|
||||
rb_define_const(rb_mGC, "INTERNAL_CONSTANTS", gc_constants);
|
||||
|
@ -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)
|
||||
|
@ -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))
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user