Skip to content

Commit 8cafa57

Browse files
eneboandrykonchin
authored andcommitted
Java 1.8 cannot alloc these without running out of memory
1 parent e965fc9 commit 8cafa57

File tree

3 files changed

+0
-36
lines changed

3 files changed

+0
-36
lines changed

core/string/unpack/m_spec.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,6 @@
180180
"dGV%zdA==".unpack("m").should == ["test"]
181181
end
182182

183-
it "correctly decodes inputs longer than 2^31 / 3 characters" do
184-
("X" * (2 ** 31 / 3 + 98)).unpack("m").first.length.should == 536870985
185-
end
186-
187-
it "correctly decodes inputs longer than 2^32 / 3 characters" do
188-
("X" * (2 ** 32 / 3 + 99)).unpack("m").first.length.should == 1073741898
189-
end
190-
191183
describe "when given count 0" do
192184
it "decodes base64" do
193185
"dGVzdA==".unpack("m0").should == ["test"]
@@ -196,13 +188,5 @@
196188
it "raises an ArgumentError for an invalid base64 character" do
197189
-> { "dGV%zdA==".unpack("m0") }.should raise_error(ArgumentError)
198190
end
199-
200-
it "correctly decodes inputs longer than 2^31 / 3 characters" do
201-
("X" * (2 ** 31 / 3 + 98)).unpack("m0").first.length.should == 536870985
202-
end
203-
204-
it "correctly decodes inputs longer than 2^32 / 3 characters" do
205-
("X" * (2 ** 32 / 3 + 99)).unpack("m0").first.length.should == 1073741898
206-
end
207191
end
208192
end

core/string/unpack/u_spec.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,4 @@
9494
["%O<.^P[\\`\n", ["\xbd\xc3\xbe\xc3\xbf"]]
9595
].should be_computed_by(:unpack, "u")
9696
end
97-
98-
it "correctly decodes inputs longer than 2^31 / 3 characters" do
99-
line = "M" + ("X" * 60) + "\n"
100-
count = (2**31 / 3) / line.length + 1
101-
(line * count).unpack("u").first.length.should == 45 * count
102-
end
103-
104-
it "correctly decodes inputs longer than 2^32 / 3 characters" do
105-
line = "M" + ("X" * 60) + "\n"
106-
count = (2**32 / 3) / line.length + 1
107-
(line * count).unpack("u").first.length.should == 45 * count
108-
end
10997
end

core/string/unpack1_spec.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,5 @@
4343
it "raises an ArgumentError for an invalid base64 character" do
4444
-> { "dGV%zdA==".unpack1("m0") }.should raise_error(ArgumentError)
4545
end
46-
47-
it "correctly decodes inputs longer than 2^31 / 3 characters" do
48-
("X" * (2 ** 31 / 3 + 98)).unpack1("m0").length.should == 536870985
49-
end
50-
51-
it "correctly decodes inputs longer than 2^32 / 3 characters" do
52-
("X" * (2 ** 32 / 3 + 99)).unpack1("m0").length.should == 1073741898
53-
end
5446
end
5547
end

0 commit comments

Comments
 (0)