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

66405 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 9ba335e2eb
[Win32] fixed PACKED_STRUCT_UNALIGNED on x86
Use MACHINE for x86 CPU family, ARCH is CPU model name (i386) and
cannot be x86.
2021-06-09 18:49:14 +09:00
Nobuyoshi Nakada 73f9831a57
POSIX timer cannot be shared in forked process [Bug #17941] 2021-06-09 12:32:18 +09:00
Peter Zhu 9f110ced57 Add multi-heap support to gc_marks_wb_unprotected_objects 2021-06-08 14:31:38 -04:00
git f9e13cda04 * 2021-06-09 [ci skip] 2021-06-09 02:19:27 +09:00
Jeremy Evans 117310bdc0
Make ENV.clone warn and ENV.dup raise
ENV.dup returned a plain Object, since all of ENV's behavior is
defined in ENV's singleton class.  So using dup makes no sense.

ENV.clone works and is used in some gems, but it doesn't do what
the user expects, since modifying ENV.clone also modifies ENV.
Add a deprecation warning pointing the user to use ENV.to_h
instead.

This also undefines some private initialize* methods in ENV,
since they are not needed.

Fixes [Bug #17767]
2021-06-08 10:19:08 -07:00
Yusuke Endoh 8c87efaa8a [ruby/psych] Fix the test that does not work with libyaml-0.1.7
https://github.com/ruby/psych/commit/542cf9754f
2021-06-08 08:12:27 +09:00
git a49a08ab98 * 2021-06-08 [ci skip] 2021-06-08 03:47:48 +09:00
Aaron Patterson 459a9f82c9
Don't create objects during GC
If we crash during GC, allocating new objects in the segv handler can
cause an infinite loop.  This commit is to avoid creating new objects in
the crash handler
2021-06-07 11:47:16 -07:00
Nobuyoshi Nakada 26fcec5ae5
[DOC] fix metacharacter markups [ci skip] 2021-06-07 20:44:05 +09:00
Nobuyoshi Nakada c741ea0be7
timev.rb: moved class rdoc from time.c 2021-06-07 20:44:05 +09:00
Nobuyoshi Nakada 4bd538e847
dir.rb: moved class rdoc from dir.c 2021-06-07 20:44:05 +09:00
Hiroshi SHIBATA bb4a10208c
Do not use YAML module in tests of Psych 2021-06-07 19:24:20 +09:00
Hiroshi SHIBATA d7146dfd7d
Use assert_raise instead of assert_raises 2021-06-07 19:21:41 +09:00
Hiroshi SHIBATA 85b94144f2
[ruby/psych] Bump version to 4.0.1
https://github.com/ruby/psych/commit/4049939006
2021-06-07 19:15:14 +09:00
Jean Boussier fd6225c7a9
[ruby/psych] Implement YAML.safe_dump to make safe_load more usable.
In case where Psych is used as a two way serializers,
e.g. to serialize some cache or config, it is preferable
to have the same restrictions on both load and dump.

Otherwise you might dump and persist some objects payloads
that you later won't be able to read.

https://github.com/ruby/psych/commit/441958396f
2021-06-07 19:15:14 +09:00
Yusuke Endoh 430883158f
[ruby/psych] Make YAML.load_file use YAML.load instead of safe_load
YAML.load and YAML.safe_load are different a little; the former allows
Symbol by default but the latter doesn't. So YAML.load_file and
YAML.safe_load_file should reflect the difference.

Fixes #490

https://github.com/ruby/psych/commit/f8a5e512a1
2021-06-07 19:15:14 +09:00
Nobuyoshi Nakada dd765f9e60
Get rid of updating Unicode files
Some certificates on Unicode.org have expired.
2021-06-07 17:45:50 +09:00
Yusuke Endoh bc126d91fe Skip make update-unicode for BASERUBY CI
Unfortunately it often fails depending on the status of www.unicode.org.

https://github.com/mame/ruby/runs/2761346164?check_suite_focus=true
```
./tool/downloader.rb:248:in `rescue in download': failed to download 12.1.0/ucd/UnicodeData.txt (RuntimeError)
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed: https://www.unicode.org/Public/12.1.0/ucd/UnicodeData.txt
```
2021-06-07 16:22:18 +09:00
git a9d7617201 * 2021-06-07 [ci skip] 2021-06-07 10:23:16 +09:00
Utkarsh Mathur ad22e88956 Fix Typo 2021-06-07 10:22:55 +09:00
Nobuyoshi Nakada cf92b3cc97
ast.rb: reduce nesting 2021-06-06 23:02:06 +09:00
git c9af563e10 * 2021-06-06 [ci skip] 2021-06-06 22:45:55 +09:00
Nobuyoshi Nakada 2e97240617
prelude.c.tmpl: strip comment-only or empty lines at the beginning 2021-06-06 22:45:37 +09:00
S.H 3208a5df2d
Improve perfomance for Integer#size method [Feature #17135] (#3476)
* Improve perfomance for Integer#size method [Feature #17135]

* re-run ci

* Let MJIT frame skip work for Integer#size

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2021-06-04 21:57:21 -07:00
git 033e76e760 * 2021-06-05 [ci skip] 2021-06-05 12:28:20 +09:00
Kazuhiro NISHIYAMA 67ca2cce0a
Update bundled_gems 2021-06-05 12:27:52 +09:00
Nobuyoshi Nakada 91c542ad05
lldb_cruby.py: push non-flonum float to history [ci skip] 2021-06-04 09:24:57 +09:00
Nobuyoshi Nakada 3c57c087ec
lldb_cruby.py: fix non-flonum float inspection [ci skip] 2021-06-04 09:12:34 +09:00
git 9f3240d4f4 * 2021-06-04 [ci skip] 2021-06-04 05:57:15 +09:00
Aaron Patterson 38c5f2737f
Support an arbitrary number of header bits (< BITS_BITLENGTH)
NUM_IN_PAGE(page->start) will sometimes return a 0 or a 1 depending on
how the alignment of the 40 byte slots work out.  This commit uses the
NUM_IN_PAGE function to shift the bitmap down on the first bitmap plane.
Iterating on the first bitmap plane is "special", but this commit allows
us to align object addresses on something besides 40 bytes, and also
eliminates the need to fill guard bits.
2021-06-03 13:56:53 -07:00
Nobuyoshi Nakada 93be7a4c6b
Suppress clobbered warnings on Travis-CI ppc64le-linux 2021-06-03 20:07:26 +09:00
Samuel Williams dc25412042 Expose `rb_fiber_transfer` and `rb_fiber_transfer_kw`. 2021-06-03 20:47:31 +12:00
Takashi Kokubun 7e14762159
Do not doubly hold an MJIT lock
This is a follow-up of 86c262541a.
CRITICAL_SECTION_START/FINISH are not needed when it's called from an
MJIT worker.

Also, ZALLOC needs to be calloc because ZALLOC may trigger GC, which an
MJIT worker must not do.
2021-06-02 23:59:33 -07:00
Nobuyoshi Nakada 9f3888d6a3 Warn more duplicate literal hash keys
Following non-special_const literals:
* T_REGEXP
2021-06-03 15:11:18 +09:00
Nobuyoshi Nakada 37eb5e7439 Warn more duplicate literal hash keys
Following non-special_const literals:
* T_BIGNUM
* T_FLOAT (non-flonum)
* T_RATIONAL
* T_COMPLEX
2021-06-03 15:11:18 +09:00
Nobuyoshi Nakada a023db49bf Assertions for duplicate literal hash key warnings 2021-06-03 15:11:18 +09:00
Takashi Kokubun 31b9ce365d
Note about 07c05b6fe9 2021-06-02 22:26:27 -07:00
Takashi Kokubun 86c262541a
Fix a race condition around mjit_recompile
This fixes SEGVs like https://github.com/ruby/ruby/runs/2715166621?check_suite_focus=true.

When mjit_recompile is called when mjit_compile is compiling the exact
same iseq (and after it called mjit_capture_cc_entries), iseq->body->jit_unit
is re-created and its cc_entries becomes NULL. Then, when it tries to
lookup cc_entries through iseq->body->jit_unit, it fails.
2021-06-02 22:11:37 -07:00
Takashi Kokubun 007e439fe9
Do not expect ec on rb_vm_bugreport
because a SEGV might happen on an MJIT worker. As you can clearly see
from `if (vm && ec) {`, ec is not guaranteed to exist here.
2021-06-02 21:50:40 -07:00
Yusuke Endoh b957c3dbcb [rubygems/rubygems] Rename test/rubygems/test_{case,utilities}.rb to avoid "test_" prefix
This changes "test/rubygems/test_case.rb" to "test/rubygems/helper.rb",
and "test/rubygems/test_utilities.rb" to "test/rubygems/utilities.rb".

The two files are a helper for tests, not test files. However, a file
starting with "test_" prefix is handled as a test file directly loaded
by test-unit because Rakefile specifies:

```
t.test_files = FileList['test/**/test_*.rb']
```

Directly loading test/rubygems/test_utilities.rb caused "uninitialized
constant Gem::TestCase". This issue was fixed by
59c6820971, but the fix caused a
"circular require" warning because test_utilities.rb and test_case.rb
are now requiring each other.

Anyway, adding "test_" prefix to a test helper file is confusing, so
this changeset reverts the fix and solve the issue by renaming them.

https://github.com/rubygems/rubygems/commit/6460e018df
2021-06-03 12:23:22 +09:00
S.H 28b481938b
Implemented some NilClass method in Ruby code is faster [Feature #17054] (#3366) 2021-06-02 20:04:56 -07:00
Aaron Patterson bc65cf1a92
use a bool instead of int 2021-06-02 14:13:34 -07:00
Peter Zhu ad734a8cc3 Allocate exact space for objspace_each_objects
We are only iterating over the eden heap so `heap_eden->total_pages`
contains the exact number of pages we need to allocate for.
`heap_allocated_pages` may contain pages in the tomb.
2021-06-02 15:49:32 -04:00
git 2a685da1fc * 2021-06-03 [ci skip] 2021-06-03 00:07:44 +09:00
Daisuke Fujimura (fd0) e451f0f678 Fix `_MSC_VER` warnings 2021-06-03 00:07:25 +09:00
Benoit Daloze 750f807575 Update to ruby/spec@c6e9285 2021-06-02 15:54:38 +02:00
Benoit Daloze 22e2a6a999 Update to ruby/spec@a0b7d0d 2021-06-02 14:34:07 +02:00
Benoit Daloze a4fbc7e288 Update to ruby/mspec@0091e8a 2021-06-02 14:34:01 +02:00
Jun Aruga 2048dfc5d3 Skip a `File.atime` test randomly failing on Travis ppc64le.
See <https://bugs.ruby-lang.org/issues/17926>.
2021-06-02 12:38:27 +02:00
Takashi Kokubun 070caf54d2
Refactor rb_vm_insn_addr2insn calls
It's been a way too much amount of ifdefs.
2021-06-02 01:16:50 -07:00