Commit graph

64552 commits

Author SHA1 Message Date
Kazuhiro NISHIYAMA
1ab6034529
Fix type of getlogin_r's 2nd argument
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
git
7d01d8811b * 2020-08-20 [ci skip] 2020-08-20 00:09:19 +09:00
Jean Boussier
aaf0e33c0a register_fstring: avoid duping the passed string when possible
If the passed string is frozen, bare and not shared, then there
is no need to duplicate it.

Ref: 4ab69ebbd7
Ref: https://bugs.ruby-lang.org/issues/11386
2020-08-19 08:08:56 -07:00
Hiroshi SHIBATA
7f0ea20581
Added did_you_mean entry because did_you_mean uses MIT license 2020-08-19 19:36:16 +09:00
Hiroshi SHIBATA
5b04e2362c
[ruby/racc] Fixed the licenses field of gemspec
a1aeecff03
2020-08-19 19:35:04 +09:00
aycabta
f81811fc2f Skip Editline for history tests of IRB
Because Editline erases all histories in Readline::HISTORY when
Readline.readline is called.
2020-08-19 19:15:21 +09:00
卜部昌平
8cc5f74ffc RHASH_EMPTY_P: convert into an inline function 2020-08-19 15:10:53 +09:00
卜部昌平
99093e1600 RHASH_TBL: is now ext-only
It seems almost no internal codes use RHASH_TBL any longer.  Why not
just eliminate it entirely, so that the macro can be purely ext-only.
2020-08-19 15:10:53 +09:00
卜部昌平
d2eeb83634 tool/update-deps -fix 2020-08-19 14:30:57 +09:00
卜部昌平
6649677eb9 ROBJECT_IV_INDEX_TBL: convert into an inline function
Former ROBJECT_IV_INDEX_TBL macro included RCLASS_IV_INDEX_TBL, which is
not disclosed to extension libraies.  The macro was kind of broken.  Why
not just deprecate it, and convert the internal use into an inline
function.
2020-08-19 14:30:57 +09:00
aycabta
e2c2283a80 Skip irb/test_history on Solaris 2020-08-19 13:03:32 +09:00
Aaron Patterson
7226f76255
Reset object allocation trace information
Compaction makes collisions in the weak map more likely.  For now, clear
the tracing information before the test run so we get accurate results
2020-08-18 19:57:45 -07:00
aycabta
e939a5c29f Use "in" and "out" options of "system" instead of "replace_stdio" 2020-08-19 11:18:50 +09:00
Aaron Patterson
7a58ee9b96 Update references when tracing allocations
The allocation tracing code keeps essentially a weak reference to
objects that have been allocated (storing the allocation information
along with the weak ref).  Compacting the heap would break references in
this weak map, so the wrong values could be returned.

This commit just updates the values in the weak ref in order to fix the
allocation tracing book keeping
2020-08-18 19:10:51 -07:00
git
371c051ca8 * 2020-08-19 [ci skip] 2020-08-19 09:46:14 +09:00
aycabta
ca6868a430 Do "write" to temp stdin before "reopen" 2020-08-19 09:42:34 +09:00
Yusuke Endoh
bed6b7206a test/irb/test_history.rb: prevent warnings
```
/home/chkbuild/chkbuild/tmp/build/20200818T123003Z/ruby/test/irb/test_history.rb:16:
warning: assigned but unused variable - result_output
/home/chkbuild/chkbuild/tmp/build/20200818T123003Z/ruby/test/irb/test_history.rb:34:
warning: assigned but unused variable - result_output
/home/chkbuild/chkbuild/tmp/build/20200818T123003Z/ruby/test/irb/test_history.rb:57:
warning: assigned but unused variable - result_output
/home/chkbuild/chkbuild/tmp/build/20200818T123003Z/ruby/test/irb/test_history.rb:80:
warning: assigned but unused variable - result_output
```
2020-08-18 23:32:46 +09:00
aycabta
6767a9ef2b Lounch external process on Windows correctly 2020-08-18 21:43:19 +09:00
Hiroshi SHIBATA
d3b2c1a175
Fixed the invalid SPDX identifier on gemspec 2020-08-18 20:26:40 +09:00
Hiroshi SHIBATA
8fb02b7a97
Update the license for the default gems to dual licenses 2020-08-18 20:26:39 +09:00
Hiroshi SHIBATA
0bb8bd7623
Added the missing licenses field to some default gems 2020-08-18 20:26:39 +09:00