[前][次][番号順一覧][スレッド一覧]

ruby-changes:60929

From: Nobuyoshi <ko1@a...>
Date: Wed, 29 Apr 2020 00:01:52 +0900 (JST)
Subject: [ruby-changes:60929] 1c7f5a5712 (master): Removed unnecessary RLIMIT_AS

https://git.ruby-lang.org/ruby.git/commit/?id=1c7f5a5712

From 1c7f5a57125001447dc6173847dc68aa50bd8e93 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Tue, 28 Apr 2020 23:36:16 +0900
Subject: Removed unnecessary RLIMIT_AS

Even without this limit, these assertions almost certainly cause a
NoMemoryError by removing the fix in 72ad8595f20.

diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index feb3db0..b6eeb77 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -1490,16 +1490,9 @@ class TestRipper::ParserEvents < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ripper/test_parser_events.rb#L1490
   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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]