dragora-installer: apply fixes and minor changes
[dragora.git] / patches / ruby / test_insns-lower-recursion-depth.patch
blob48e88dfd60c1ccee185f0ead2b1a161313c816f5
1 The patched test is a recursion function. We have lower stack size,
2 so we hit SystemStackError sooner than on other platforms.
4 #361 test_insns.rb:389:in `block in <top (required)>':
5 # recursive once
6 def once n
7 return %r/#{
8 if n == 0
9 true
10 else
11 once(n-1) # here
12 end
13 }/ox
14 end
15 x = once(128); x = once(7); x = once(16);
16 x =~ "true" && $~
17 #=> "" (expected "true") once
18 Stderr output is not empty
19 bootstraptest.tmp.rb:3:in `once': stack level too deep (SystemStackError)
20 from bootstraptest.tmp.rb:7:in `block in once'
21 from bootstraptest.tmp.rb:3:in `once'
22 from bootstraptest.tmp.rb:7:in `block in once'
23 from bootstraptest.tmp.rb:3:in `once'
24 from bootstraptest.tmp.rb:7:in `block in once'
25 from bootstraptest.tmp.rb:3:in `once'
26 from bootstraptest.tmp.rb:7:in `block in once'
27 from bootstraptest.tmp.rb:3:in `once'
28 ... 125 levels...
29 from bootstraptest.tmp.rb:3:in `once'
30 from bootstraptest.tmp.rb:7:in `block in once'
31 from bootstraptest.tmp.rb:3:in `once'
32 from bootstraptest.tmp.rb:11:in `<main>'
33 Test_insns.rb FAIL 1/187
34 FAIL 1/1197 tests failed
35 Make: *** [uncommon.mk:666: yes-btest-ruby] Error 1
37 --- a/bootstraptest/test_insns.rb
38 +++ b/bootstraptest/test_insns.rb
39 @@ -248,7 +248,7 @@
40 end
41 }/ox
42 end
43 - x = once(128); x = once(7); x = once(16);
44 + x = once(32); x = once(7); x = once(16);
45 x =~ "true" && $~
47 [ 'once', <<~'},', ], # {