Граф коммитов

62822 Коммитов

Автор SHA1 Сообщение Дата
Lars Kanis 92b2d5816a Add documentation to "dcompact" callback and "parent" member 2020-08-25 10:50:51 -07:00
Peter Zhu 326d89b7ce Correctly account for heap_pages_final_slots so it does not underflow
`rb_objspace_call_finalizer` creates zombies, but does not do the correct accounting (it should increment `heap_pages_final_slots` whenever it creates a zombie). When we do correct accounting, `heap_pages_final_slots` should never underflow (the check for underflow was introduced in 39725a4db6).

The implementation moves the accounting from the functions that call `make_zombie` into `make_zombie` itself, which reduces code duplication.
2020-08-25 10:14:10 -07:00
git 8c030b5c00 * 2020-08-26 [ci skip] 2020-08-26 00:47:44 +09:00
Burdette Lamar 36cc53daae
Comply with guide for method doc: hash.c (#3451)
Methods:

    ::new
    ::[]
    ::try_convert
    #rehash
    #[]
    #fetch
    #default
    #default=
    #default_proc
    #default_proc=
2020-08-25 10:47:23 -05:00
Hiroshi SHIBATA 2e3a7f70ae
Promote nkf to default gems 2020-08-25 21:17:19 +09:00
Lars Kanis 8d68f54c94 Fix erb executable
Run ERb processing unconditionally since __FILE__ and $0 doesn't match
in a gem context.
2020-08-25 18:11:43 +09:00
Hiroshi SHIBATA e6ac1fb612
Specify the executable of erb 2020-08-25 08:44:14 +09:00
git 1b34d843ea * 2020-08-25 [ci skip] 2020-08-25 08:11:07 +09:00
Jeremy Evans 9e25eb308d Update PTY.open documentation to document it yields a single argument [ci skip]
For a regular block, accepting two arguments is fine as the array
will be autosplatted.   However, a lambda that accepts two arguments
will not work.

We could change the implementation to yield two arguments instead
of an array with a single argument, but that would be less backwards
compatible.

I'm only changing the call-seq to be precise, other examples pass
a literal block that accepts two arguments, and I left those alone
as that will be the most common usage.

Fixes [Bug #17094]
2020-08-24 16:09:22 -07:00
Hiroshi SHIBATA 1eb1add68a
Added entry for changes of default gems 2020-08-24 19:24:07 +09:00
Kazuhiro NISHIYAMA cb7634c142
Fix links [ci skip] 2020-08-24 15:58:52 +09:00
Yusuke Endoh 09acafaccf NEWS.md: add an example, add references, and move some items 2020-08-24 15:38:03 +09:00
git f292bb245e * 2020-08-24 [ci skip] 2020-08-24 02:10:21 +09:00
Burdette Lamar 1d3e87a28c
Remove checks for self returned in array.c and hash.c examples (#3446)
Further compliance with https://github.com/ruby/ruby/blob/master/doc/method_documentation.rdoc#details-and-examples-
2020-08-23 12:10:01 -05:00
Kazuhiro NISHIYAMA 30ccc7d04b
Fix typos 2020-08-23 22:46:04 +09:00
git 4f7ff9c99d * 2020-08-23 [ci skip] 2020-08-23 21:46:13 +09:00
卜部昌平 2c4c088aa3 .github/workflows/compilers.yml: more compilers
Added some cross compilers that we can run on GitHub Workflow runner
environments.  Because they are cross compilers we cannot run the
generated binary.  The added matrix are compile-only.
2020-08-23 21:45:46 +09:00
卜部昌平 2ddc67ffb6 configure.ac: suppress more Sun C warnings.
They are rather annoying than being useful to us.
2020-08-22 14:12:12 +09:00
卜部昌平 331d02038b .travis.yml: prefer gcc
It seems `clang --save-temps` does not interface well with
tool/update-deps.  Prefer gcc for that purpose.
2020-08-22 11:12:24 +09:00
卜部昌平 d916a4c897 configure.ac: more checks on STRIP
STRIP now depends on compilers, not on OS.  Previous check against
$target_os does no longer work.
2020-08-22 09:49:08 +09:00
Kazuhiro NISHIYAMA 1ab6034529
Fix type of getlogin_r's 2nd argument
https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd12/ruby-master/log/20200821T223002Z.fail.html.gz
```
process.c:5593:37: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
    while ((gle = getlogin_r(login, loginsize)) != 0) {
                  ~~~~~~~~~~        ^~~~~~~~~
```

type of getlogin_r's 2nd argument is
- int on FreeBSD
  - https://www.freebsd.org/cgi/man.cgi?query=getlogin_r&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html
- size_t on Linux, NetBSD
  - https://man7.org/linux/man-pages/man3/getlogin_r.3.html
  - https://www.freebsd.org/cgi/man.cgi?query=getlogin_r&apropos=0&sektion=0&manpath=NetBSD+9.0&arch=default&format=html
2020-08-22 09:39:24 +09:00
Jeremy Evans a0273d67d0 Avoid a use after free in VM assertion
If the thread for the current EC has been killed, don't check
the VM ptr for the EC (which gets it via the thread), as that will
have already been freed.

Fixes [Bug #16907]
2020-08-21 14:52:30 -07:00
Burdette Lamar ea4ccc0992
Remove trivial examples from array.c (#3442)
"Trivial" typically means "returns a new empty Array."
2020-08-21 15:50:56 -05:00
Burdette Lamar 0fea0427ae
Remove nil-return examples from hash.c (#3438)
* Remove nil-return examples from hash.c
2020-08-21 11:42:02 -05:00
卜部昌平 914b2208ab configure.ac: rule out old Sun C++
CI failures observed for old Sun C++.  We don't want to hustle, as newer
versions are okay.  Just check the sanity and rule out insane compilers.
2020-08-22 00:45:39 +09:00
卜部昌平 954afd1bc5 protect CFLAGS from being smashed by AC_PROG_CC
AC_PROG_CC_C99 calls AC_PROC_CC, which calls _AC_PROG_CC_G, which sets
default CFLAGS, whose contents are not customisable.  We don't welcome
this behaviour.

The exact same thing happens for CXXFLAGS in AC_PROG_CXX.
2020-08-22 00:45:39 +09:00
git 7263fd6ff4 * 2020-08-22 [ci skip] 2020-08-22 00:33:57 +09:00
卜部昌平 cc2caa6edf do not test --version
`llvm-strip-7` is a sane valid strip command that LLVM 7 ships, albeit
it does not understand `--version`.  It is a bad idea to check that
option.  Instead just see if the command actually strips something.  A
copy of `/bin/sh` should suffice.  That file must be ubiquitous.
2020-08-22 00:33:37 +09:00
Hiroshi SHIBATA 44d25c6528
Fixup 3292f4d965 2020-08-21 20:40:26 +09:00
Hiroshi SHIBATA 3292f4d965
Fixed the executable path for erb command 2020-08-21 20:28:51 +09:00
Hiroshi SHIBATA 8c97883b73
Promote erb to default gems 2020-08-21 20:18:44 +09:00
Hiroshi SHIBATA bc374e5cea
Promote rinda to default gems 2020-08-21 18:10:03 +09:00
卜部昌平 3eb76e747e configure.ac: try GCC-provided ld
In case of cross-compilation, GCC might provide its own linker.  Its
behaviour seems slightly different from that of gcc(1).  This is not a
big deal for normal situations, but the difference can cause libtool to
go mad.

We ship bundled libffi for windows users, and libffi uses libtool.  If
we use cross-compiler version of gcc instead of its ld conterpart, we
fail to compile fiddle.  That should not be what we want.
2020-08-21 16:01:46 +09:00
卜部昌平 73b6bc5790 AC_PROG_CXXCPP: remove
Caused CI failures on environments without sane C++ compilers.
2020-08-21 11:47:18 +09:00
卜部昌平 7341b1a53d configure.ac: move program_transform_name
Historically `$program_transform_name` has been put in front of
`AC_CANONICAL_TARGET`.  Previous commit changes it, which affects the
name of generated ruby binary when cross-compiling.  I _guess_ the
historical behaviour is a bug (name of ruby binary shall honour --target
configure option I think), but anyways here I preserve that questionable
way.
2020-08-21 11:04:54 +09:00
卜部昌平 2c96e04868 configure.ac: use compiler-provided toolchains
These days as link-time optimisations spread accross compilers, they
tend to ship their own version of ld, ar, etc.  Why not detect such
things if any.  Users can select compilers by ./configure --with-gcc=
whatever, or select individual tool by e.g. ./configure NM=whatever.

The added AC_ARG_VAR macros enrich ./configure --help output.
2020-08-21 11:04:54 +09:00
卜部昌平 8b022da518 HAVE_STMT_AND_DECL_IN_EXPR: not for Sun C++
Because we check HAVE_STMT_AND_DECL_IN_EXPR in configure, it is peoven
to work in C.  But C++ situation can be different.  Oracle Developer
Studio is another example of such things.
2020-08-21 11:04:54 +09:00
卜部昌平 80b316212a ext/-test-/cxxanyargs: suppress SunPro warning
I found a way to suppress particular kind of warnings via pragmas.
2020-08-21 11:04:54 +09:00
卜部昌平 01826b3fda RBIMPL_HAS_CPP_ATTRIBUTE: handle SunPro
Oracle Developer Studio's C++ preprocessor started to understand
__has_cpp_attribute since version 12.5, and is broken.  After looking
around for a while I found Boost and ICU also had this issue before.
Let me add workaround for it.
2020-08-21 11:04:54 +09:00
Burdette Lamar b6c7b94b1c
Remove nil-return examples from array.c (#3437) 2020-08-20 20:40:26 -05:00
git 6ba038af31 * 2020-08-21 [ci skip] 2020-08-21 02:10:09 +09:00
Burdette Lamar 51525557fd
Partial compliance with doc/method_documentation.rdoc in string.c (#3436)
Removes references to *-convertible thingies.
2020-08-20 12:09:49 -05:00
Burdette Lamar 1d1e36fab6
Partial compliance with doc/method_documentation.rdoc in hash.c (#3432)
Removes references to *-convertible thingies.
2020-08-20 07:34:24 -05:00
Hiroshi SHIBATA dfda2f739b
Promote find to default gems 2020-08-20 21:00:53 +09:00
aycabta 6509652c13 Skip irb/test_history on Windows too 2020-08-20 13:24:55 +09:00
Hiroshi SHIBATA 8a40e9b5a2
Promote set to default gems 2020-08-20 12:39:11 +09:00
Marc-Andre Lafortune eae7aef020 [DOC] Improve Hash's doc for missing keys 2020-08-19 19:32:15 -04:00
Marc-Andre Lafortune a586ccf21f [DOC] Improve and simplify key egality documentation for Hash 2020-08-19 19:32:15 -04:00
Burdette Lamar 63d213eb13
Partial compliance with doc/method_documentation.rdoc (#3431)
Removes references to *-convertible thingies.
2020-08-19 16:26:40 -05:00
Jean Boussier a74df67244 Fix ObjectSpace.trace_object_allocations_stop to not raise if the tracepoint were not initialized 2020-08-19 08:13:09 -07:00