On s390x, TestFiber#test_stack_size fails with SEGV.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel_zlinux/ruby-master/log/20200205T223421Z.fail.html.gz
```
TestFiber#test_stack_size [/home/chkbuild/build/20200205T223421Z/ruby/test/ruby/test_fiber.rb:356]:
pid 23844 killed by SIGABRT (signal 6) (core dumped)
| -e:1:in `times': stack level too deep (SystemStackError)
| from -e:1:in `rec'
| from -e:1:in `block (3 levels) in rec'
| from -e:1:in `times'
| from -e:1:in `block (2 levels) in rec'
| from -e:1:in `times'
| from -e:1:in `block in rec'
| from -e:1:in `times'
| from -e:1:in `rec'
| ... 172 levels...
| from -e:1:in `block in rec'
| from -e:1:in `times'
| from -e:1:in `rec'
| from -e:1:in `block in <main>'
| -e: [BUG] Segmentation fault at 0x0000000000000000
```
This change tries a similar fix with
ef64ab917e and
3ddbba84b5.
I struggled figuring out which of the pack/unpack functions goes into which direction and the two first sentences were of the documentation were:
* Import an integer into a buffer.
* Export an integer into a buffer.
It sounds like both of them go from a ruby integer to a buffer because both use "into". So I fixed it and went to "Import an integer from a buffer". I find this much more clear.
This condition is too restrictive in my opinion. If a user has a pre
version of rubygems installed, she should be fully responsible for it,
and we shouldn't restrict any functionality.
Also, why is a new prerelease disallowed but an old prelease allowed, or
why is 2.0.0.rc2 explictly whitelisted? I believe this kind of
exceptions are one more reason to actually permit this.
https://github.com/rubygems/rubygems/commit/7f77a77620
Let me quote ISO/IEC 9899:2018 section 6.5.15:
> Constraints
>
> The first operand shall have scalar type.
> One of the following shall hold for the second and third operands:
> — both operands have arithmetic type;
> — both operands have the same structure or union type;
> — both operands have void type;
(snip)
Here, `*option` is a const struct rb_compile_option_struct. OTOH
`COMPILE_OPTION_DEFAULT` is a struct rb_compile_option_struct, without
const. These two are _not_ the "same structure or union type". Hence
the expression renders undefined behaviour. COMPILE_OPTION_DEFAULT is
not a const because `RubyVM::InstructionSequence.compile_option=`
touches its internals on-the-fly. There is no way to meet the
constraints quoted above.
Using ternary operator here was a mistake at the first place. Let's
just replace it with a normal `if` statement.
There are cases when sizeof(int) == sizeof(long) == sizeof(size_t). On
such cases however int and long are incompatible types in theory. We
should not assume typedef long size_t, because on Solaris size_t is
actually a typedef of int.
This reduces compiler warnings on such situations.
Namely recent Sun C compiler has this function, and is not a GCC.
Meanwhile the code without RUBY_JMP_BUF assumes GCC. We have to define
the macro when we detect __builtin_setjmp for non-GCC compilers.
Predefined macros are practices not very well recommended, but can be
better than having no documents at all. Without those predefined
macros, Doxygen confused for instace PUREFUNC(int foo()) to be a
declaration of PUREFUNC, not foo.
It was set to 1000 in a4a2b9be7a.
However on ruby-2.7.0p0, there are much more than 1k frozen string right after boot:
```
$ ruby -robjspace -e 'p ObjectSpace.each_object(String).select { |s| s.frozen? && ObjectSpace.dump(s).include?(%{"fstring":true})}.uniq.count'
5948
```
To output to the STDOUT of the parent process according to the
parallel test protocol, should send to the `MiniTest::Unit.output`
instead of each own STDOUT.