1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Removed unnecessary RLIMIT_AS

Even without this limit, these assertions almost certainly cause a
NoMemoryError by removing the fix in 72ad8595f2.
This commit is contained in:
Nobuyoshi Nakada 2020-04-28 23:36:16 +09:00
parent 86431f5075
commit 1c7f5a5712
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -1490,16 +1490,9 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
end
def test_block_variables
assert_equal("[fcall(proc,[],&block([],[void()]))]", parse("proc{|;y|}"))
if defined?(Process::RLIMIT_AS)
dir = File.dirname(__FILE__)
as = 100 * 1024 * 1024 # 100MB
as *= 2 if RubyVM::MJIT.enabled? # space for compiler
assert_in_out_err(%W(-I#{dir} -rdummyparser),
"Process.setrlimit(Process::RLIMIT_AS,#{as}); "\
"puts DummyParser.new('proc{|;y|!y}').parse",
["[fcall(proc,[],&block([],[unary(!,ref(y))]))]"], [], '[ruby-dev:39423]')
end
bug4159 = '[ruby-dev:39423]'
assert_equal("[fcall(proc,[],&block([],[void()]))]", parse("proc{|;y|}"), bug4159)
assert_equal("[fcall(proc,[],&block([],[unary(!,ref(y))]))]", parse("proc{|;y|!y}"), bug4159)
end
def test_unterminated_regexp