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

60514 Коммитов

Автор SHA1 Сообщение Дата
Takashi Kokubun d8fcc67642
Skip test_06_timeout for --jit-wait CI
This test has been too unstable on trunk-mjit-wait
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2782206
2020-03-08 22:34:33 -07:00
Hiroshi SHIBATA 544ebc669b
Use https for downloading Unicode data.
Retry with 90de118a75

  [Bug #13962][ruby-core:83074]
2020-03-09 13:39:23 +09:00
Jeremy Evans f4394bbca3 Do not autosplat when calling procs that accept rest and keywords
When providing a single array to a block that takes a splat, pass the
array as one argument of the splat instead of as the splat itself,
even if the block also accepts keyword arguments.  Previously, this
behavior was only used for blocks that did not accept keywords.

Implements [Feature#16166]
2020-03-08 20:49:09 -07:00
Jeremy Evans 040cfc89b9 Do not set USE_FFI_CLOSURE_ALLOC=1 in fiddle on OpenBSD
On OpenBSD, USE_FFI_CLOSURE_ALLOC was always set to 0 previously. In
633a1f15d8, the code was modified in a
way that it ended up being set to 1 on OpenBSD.  However, that results
in SIGABRT when running make test-all, inside ffi_closure_free.
Setting USE_FFI_CLOSURE_ALLOC back to 0 fixes the issue.
2020-03-08 17:47:48 -07:00
git fe3514ae60 * 2020-03-09 [ci skip] 2020-03-09 02:57:48 +09:00
Koichi Sasada dff69bb462 Cast properly for shift operand
`(int) << RHASH_LEV_SHIFT` can be negative integer.
2020-03-09 02:53:46 +09:00
Nobuyoshi Nakada daa04c5562
Word array instead of splitting 2020-03-08 17:39:22 +09:00
Nobuyoshi Nakada 2b7409a2f2
Specify explicit separator not to be affected by $; 2020-03-08 17:38:37 +09:00
git 53efe63280 * 2020-03-08 [ci skip] 2020-03-08 10:19:18 +09:00
David Rodríguez 2b6ec768fc
Fix rbinstall bugs (#2930)
* Fix incorrect calls to `Gem.ensure_gem_subdirectories`

This method doesn't take keyword args.

* Remove stuff no longer necessary

Now `Gem.ensure_gem_subdirectories` is doing its job, so some stuff is
no longer needed.

* Use the proper method for default gems

* Respect DESTDIR when creating rubygems folder layout

* Use `Gem.default_specifications_dir`
2020-03-08 10:18:53 +09:00
Hiroshi SHIBATA 47a1872cd8
Use osuosl instead of GitHub releases
Because the package provided by GitHub releases is different from sourceware.
2020-03-07 20:45:09 +09:00
Hiroshi SHIBATA 8602216746
Switch to download libffi source package to github releases from sourceware.org 2020-03-07 19:57:28 +09:00
卜部昌平 ada2f71c70 rb_check_safe_obj no longer exists
Commit e91c39f1c0 deleted definition of it.
Though I'm not sure if we can delete public API like this, it no longer
works nontheless.  Having declaration without definiton is worse than
having nothing at all.  Just delete the declartion too.
2020-03-07 19:06:10 +09:00
Takashi Kokubun f9f3510e64
Hook an experimental alert from Actions 2020-03-07 00:34:41 -08:00
Takashi Kokubun b9d45d3ac0
Hook an experimental alert from Travis 2020-03-07 00:21:39 -08:00
Nobuyoshi Nakada 108f7536b3
Removed unnecessary `chomp`
As `String#split` with the default argument drops trailing newline
as a separator, preceding `String#chomp` is futile.
2020-03-07 17:04:37 +09:00
Takashi Kokubun 65aa68b009
Hook an experimental alert from AppVeyor 2020-03-06 23:46:55 -08:00
Kazuhiro NISHIYAMA fcd605020b
Fix a typo 2020-03-07 13:49:28 +09:00
Takashi Kokubun 9745e90197
Propagate JIT skip to all tests 2020-03-06 20:19:56 -08:00
Jeremy Evans f991340e07 Document defined? and global_variables handling of regexp global variables [ci skip]
Fixes [Bug #11304]
2020-03-06 13:06:49 -08:00
Koichi Sasada c3584dfacc check ar_table first.
RHASH_AR_TABLE_SIZE() has assertion that it is a ar_talbe.
The last commit breaks this assumption so check ar_table first.
2020-03-07 03:55:54 +09:00
Koichi Sasada 4c019f5a62 check ar_table after `#hash` call
ar_table can be converted to st_table just after `ar_do_hash()`
function which calls `#hash` method. We need to check
the representation to detect this mutation.
[Bug #16676]
2020-03-07 03:34:17 +09:00
git 44462d3206 * 2020-03-07 [ci skip] 2020-03-07 02:39:19 +09:00
Takashi Kokubun 87ad5ea729
Skip jit_test on some new RubyCI envs for now 2020-03-06 09:38:55 -08:00
Yusuke Endoh 0256e4f0f5 thread_pthread.c: allocate sigaltstack before pthread_create
A new (not-initialized-yet) pthread attempts to allocate sigaltstack by
using xmalloc.  It may cause GC, but because the thread is not
initialized yet, ruby_native_thread_p() returns false, which leads to
"[FATAL] failed to allocate memory" and exit.

In fact, we can observe the error message in the log of OpenBSD CI:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20200306T083005Z.log.html.gz

This changeset allocates sigaltstack before pthread is created.
2020-03-06 21:41:34 +09:00
Marcus Stollsteimer baaf681570
Improve docs for Prime.{prime_division,int_from_prime_division} (#8)
Move explanation for the decomposition array from the Example section
to the method description. Mention the term "multiplicity".

Use examples that also demonstrate factors with multiplicity
other than 1, and avoid factors/multiplicities with the same value.
Also add the decomposition written as simple mathematical expression.

This also fixes missing syntax highlighting for the code examples
due to verbatim blocks that did not only include Ruby code.
2020-03-06 20:55:22 +09:00
Marcus Stollsteimer e92fbaf609 [ruby/prime] Fix typo
https://github.com/ruby/prime/commit/549c1b86f1
2020-03-06 20:54:45 +09:00
Marcus Stollsteimer f236f6082c [ruby/prime] Improve docs for Prime.include? (#7)
https://github.com/ruby/prime/commit/230a5af325
2020-03-06 20:54:38 +09:00
Jeremy Evans e79fc05a4c [ruby/prime] Fix Prime.include?
Previously, it would be an infinite loop if passed a non-prime
integer.

Also, Prime.include? should also provide similar results to
Module#include? if passed a Module, so handle that.

For consistency with Enumerable#include?, return false if passed
other object types.

Fixes Ruby Bug 10167.

https://github.com/ruby/prime/commit/55dda6aa7f
2020-03-06 20:54:33 +09:00
git 2630757fb5 * 2020-03-06 [ci skip] 2020-03-06 07:49:50 +09:00
Charles Oliver Nutter e57dd8c2b5
Mask RubyVM-specific test 2020-03-05 16:49:27 -06:00
Yusuke Endoh 17d5efa4fe spec/ruby/core/process/exec_spec.rb: remove a guard for openbsd
openbsd current seems to behave the same as other OSs.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20200305T063005Z.fail.html.gz
2020-03-05 18:25:47 +09:00
Nobuyoshi Nakada 7d05f98a84
Renamed `lex_flags` as `lex_context` 2020-03-05 17:19:17 +09:00
Nobuyoshi Nakada e4a9e926f0
Fixed a typo 2020-03-05 13:31:25 +09:00
Nobuyoshi Nakada 43a3c88187
[win32] get rid of redefinition of reserved macro
```
warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
```
2020-03-05 12:03:39 +09:00
git 740511834f * 2020-03-05 [ci skip] 2020-03-05 11:31:57 +09:00
Nobuyoshi Nakada 261569d4aa
[ruby/fiddle] always use ffi_closure_alloc on Windows 2020-03-05 11:31:08 +09:00
Nobuyoshi Nakada f08cd708b1
Fixed FD leak 2020-03-04 23:26:57 +09:00
Nobuyoshi Nakada 528a3a1797
[ruby/fiddle] use ffi_closure_alloc only with 3.2 or later 2020-03-04 23:19:35 +09:00
Nobuyoshi Nakada 5bb80b76b0
[win32] suppress false warning by mingw gcc 2020-03-04 23:13:18 +09:00
Nobuyoshi Nakada 364526cd70
[win32] suppress false warning by MSVC 2020-03-04 21:02:24 +09:00
Nobuyoshi Nakada 502d9bcd36
Fixed never-defined symbol name 2020-03-04 21:00:17 +09:00
Nobuyoshi Nakada 95f387f61a
[ruby/fiddle] ffi_closure_free is available in the bundled libffi 2020-03-04 18:41:47 +09:00
Nobuyoshi Nakada 633a1f15d8
[ruby/fiddle] Use ffi_closure_free if available 2020-03-04 18:14:18 +09:00
Yusuke Endoh d732bc51bd Revert "Revert "Revert "[ruby/fiddle] Use ffi_closure_free by default. (#20)"""
This reverts commit 87f6154bb4.

It turned out that the change fails to build on macOS

https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1014/ruby-master/log/20200304T074503Z.fail.html.gz
```
+ make 'TESTS=--hide-skip -v fiddle' RUBYOPT=-w test-all
dyld: lazy symbol binding failed: Symbol not found: _ffi_closure_alloc
  Referenced from: /Users/hsbt/Documents/cb/tmp/build/20200304T074503Z/ruby/.ext/x86_64-darwin18/fiddle.bundle
  Expected in: flat namespace

dyld: Symbol not found: _ffi_closure_alloc
  Referenced from: /Users/hsbt/Documents/cb/tmp/build/20200304T074503Z/ruby/.ext/x86_64-darwin18/fiddle.bundle
  Expected in: flat namespace

make: *** [yes-test-all] Abort trap: 6
```
2020-03-04 17:28:21 +09:00
Yusuke Endoh 87f6154bb4 Revert "Revert "[ruby/fiddle] Use ffi_closure_free by default. (#20)""
This reverts commit efd641ffab.

This changeset seems to be needed to suppress a warning on Ubuntu 20.04
https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20200304T033004Z.log.html.gz
```
closure.c:264:5: warning: 'ffi_prep_closure' is deprecated: use ffi_prep_closure_loc instead [-Wdeprecated-declarations]
  264 |     result = ffi_prep_closure(pcl, cif, callback, (void *)self);
      |     ^~~~~~
```

I guess there was a reason why the commit was reverted (maybe some CIs
failed?), so try it again.
2020-03-04 15:46:26 +09:00
Yusuke Endoh 16415fefc1 test/lib/jit_support.rb: The path to icc was changed 2020-03-04 12:31:55 +09:00
卜部昌平 aa44b29030 suppress uninitialized variable warnings
Starting GCC 7, warnings about uninitialized variables are issued around
them.  Such warnings could be false positives (all versions of clang do
not warn), but adding initializers there could never be bad things.
2020-03-04 12:30:42 +09:00
卜部昌平 f7048f9d55 tool/lib/test/unit: support TESTS='-- -ext-' again
There is a test directory named test/-ext-.  Because this directry
starts with a hyphen, we have to cheat test/unit in order for it to
run the tests underneath.  TESTS='-- -ext' worked for a long time.
Let's not break that maneuver.
2020-03-04 12:30:42 +09:00
卜部昌平 f12b9a3338 %p is for void *
See also
35eb12c063
6f5eb28507
687308cf0d
b6a2d63eb3
2020-03-04 12:30:42 +09:00