1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

64512 commits

Author SHA1 Message Date
卜部昌平
fee2913d0a Struct::Tms: delete
Has been deprecated since 44c53ee473.
2020-12-22 13:52:18 +09:00
卜部昌平
fa356a798a Enumerator.new: raise unless block given
Has been deprecated since c73b6bd7eb.
[Feature ] [ruby-dev:50945]
2020-12-22 13:52:03 +09:00
Koichi Sasada
7204b81bcb fix to use rb_ractor_id()
Catch up recent changes on USE_RUBY_DEBUG_LOG=1.
2020-12-22 12:59:47 +09:00
Koichi Sasada
2e1cdf36ba add a NEWS entry about ractor C API 2020-12-22 12:46:15 +09:00
Akinori MUSHA
be9b5553a3 Add entries for set 1.0.0 2020-12-22 12:26:45 +09:00
Akinori MUSHA
3fa4bd8292 Import set 1.0.0
- SortedSet has been removed for dependency and performance reasons.
- Set#join is added as a shorthand for `.to_a.join`.
- Set#<=> is added.

https://github.com/ruby/set/blob/v1.0.0/CHANGELOG.md
2020-12-22 12:20:21 +09:00
Akinori MUSHA
63b872c409 Prepare for importing the set gem 2020-12-22 12:17:47 +09:00
Marc-Andre Lafortune
d0050edb84 Update Fiber#backtrace doc [See bug ] 2020-12-21 21:07:13 -05:00
zverok
843fd1e8cf Document Fiber#backtrace and #backtrace_locations 2020-12-21 19:22:38 -05:00
zverok
816bbfdc87 Document Proc#== 2020-12-21 19:22:38 -05:00
zverok
861dbd9506 Random instance methods 2020-12-21 19:22:38 -05:00
zverok
4728c0d900 Add Symbol#name and freezing explanation to #to_s 2020-12-21 19:22:38 -05:00
Yusuke Endoh
4a18cc7f60 NEWS.md: mention the behavior change of Binding#eval
[Bug ]
2020-12-22 09:04:54 +09:00
Marc-Andre Lafortune
91773ddd26 Remove debugging code 2020-12-21 18:56:46 -05:00
nagachika
831f785068 [DOC] Fix typo in Ractor.make_shareable documentation. 2020-12-22 08:08:27 +09:00
Nobuyoshi Nakada
a29b9e5efe
Remvoed no longer needed version guards 2020-12-22 07:52:14 +09:00
Koichi Sasada
c34c6a89cb fix ractor's doc. [ci skip] 2020-12-22 06:09:42 +09:00
Koichi Sasada
520dcbd600 reset cache before iterating
cee02d754d resets pCMC and `me`
will be a invalidated and continuing the invalidated `me`,
it will break the data structure. This patch tris to clear
all methods of specified class before manipulating the `me`s.
[Issue ]
2020-12-22 06:09:30 +09:00
Koichi Sasada
d0e4ccbefc add Ractor.main
It returns main Ractor, like Thread.main.
[Feature ]
2020-12-22 05:54:14 +09:00
Koichi Sasada
35471a9487 add Ractor#[]/#[]= for ractor local storage
This API is similar to plain old Thread#[]/Fiber#[] interface
with symbol key.
2020-12-22 05:26:32 +09:00
Marc-Andre Lafortune
8f2031a067 Ractor#to_s as #inspect 2020-12-21 13:31:00 -05:00
Nobuyoshi Nakada
8918a9cf6c Removed rb_cData entity
* Use the wrapper of rb_cObject instead of data access
* Replaced rest of extentions
* Updated the version guard for Data
* Added the version guard of rb_cData
2020-12-22 02:51:49 +09:00
卜部昌平
c30f03d328 Data: delete
Has been deprecated since 684bdf6171.

Matz says in [ruby-core:83954] that Data should be an alias of Object.
Because rb_cData has not been deprecated, let us deprecate the constant
to make it a C-level synonym of rb_cObject.
2020-12-22 02:51:49 +09:00
Kazuki Tsujimoto
5c0abe2d94
Update documentation for pattern matching 2020-12-22 02:08:57 +09:00
git
208f7d7c80 * 2020-12-22 [ci skip] 2020-12-22 00:03:21 +09:00
Koichi Sasada
02d9524cda separate rb_ractor_pub from rb_ractor_t
separate some fields from rb_ractor_t to rb_ractor_pub and put it
at the beggining of rb_ractor_t and declare it in vm_core.h so
vm_core.h can access rb_ractor_pub fields.

Now rb_ec_ractor_hooks() is a complete inline function and no
MJIT related issue.
2020-12-22 00:03:00 +09:00
Koichi Sasada
a2950369bd TracePoint.new(&block) should be ractor-local
TracePoint should be ractor-local because the Proc can violate the
Ractor-safe.
2020-12-22 00:03:00 +09:00
Nobuyoshi Nakada
c7a5cc2c30
Replaced magic numbers tr table 2020-12-21 23:45:38 +09:00
Naohisa Goto
84eebb3c9e On Solaris, _XOPEN_SOURCE should be undefined for C++ sources. 2020-12-21 23:42:34 +09:00
Koichi Sasada
91e2f08a6a export rb_eRactorIsolationError for MJIT
https://ci.appveyor.com/project/ruby/ruby/builds/36942168/job/7ugrpk0pndoly9wp
```
_ruby_mjit_p11920u0.c
C:\Users\appveyor\AppData\Local\Temp\1/_ruby_mjit_p11920u0.c(14) : warning C4005: 'GET_SELF' : macro redefinition
        c:\projects\ruby\vm_insnhelper.h(111) : see previous definition of 'GET_SELF'
   Creating library C:\Users\appveyor\AppData\Local\Temp\1/_ruby_mjit_p11920u0.lib and object C:\Users\appveyor\AppData\Local\Temp\1/_ruby_mjit_p11920u0.exp
_ruby_mjit_p11920u0.obj : error LNK2001: unresolved external symbol rb_eRactorIsolationError
C:\Users\appveyor\AppData\Local\Temp\1/_ruby_mjit_p11920u0.so : fatal error LNK1120: 1 unresolved externals
```
2020-12-21 23:28:05 +09:00
Kenta Murata
0b6a80c0be
[json] Avoid method redefinition 2020-12-21 22:41:24 +09:00
Koichi Sasada
dca6752fec Introduce Ractor::IsolationError
Ractor has several restrictions to keep each ractor being isolated
and some operation such as `CONST="foo"` in non-main ractor raises
an exception. This kind of operation raises an error but there is
confusion (some code raises RuntimeError and some code raises
NameError).

To make clear we introduce Ractor::IsolationError which is raised
when the isolation between ractors is violated.
2020-12-21 22:29:05 +09:00
Kenta Murata
8c0c61728f
NEWS: JSON is Ractor compatible [ci skip] 2020-12-21 22:16:02 +09:00
Kenta Murata
14d7d1df25
[json] Make json Ractor safe 2020-12-21 22:10:43 +09:00
Kenta Murata
4c2e7f26bd
[json] JSON_parse_float: Fix how to convert number
Stop BigDecimal-specific optimization.  Instead, it tries the conversion
methods in the following order:

1. `try_convert`,
2. `new`, and
3. class-named function, e.g. `Foo::Bar.Baz` function for `Foo::Bar::Baz` class

If all the above candidates are unavailable, it fallbacks to Float.
2020-12-21 22:10:43 +09:00
Kenta Murata
596da98b3f
[json] Make JSON.create_id thread-safe 2020-12-21 22:10:42 +09:00
Kenta Murata
98cc15ed1e
[json] Stop using prototype objects 2020-12-21 22:10:33 +09:00
Nobuyoshi Nakada
d84dd66da0
Fixed a typo in an error class name 2020-12-21 18:17:45 +09:00
Nobuyoshi Nakada
b9d00f42e6
Enable escape sequence on Windows10 console via pager too 2020-12-21 18:12:02 +09:00
Kenta Murata
d8469507b9
[ruby/digest] Remove .gitignore and .travis.yml from gemspec
https://github.com/ruby/digest/commit/7b57b73f46
2020-12-21 17:46:30 +09:00
U.Nakamura
09f939d3a0 Enable escape sequence on Windows10 console
* win32/win32.c (init_stdhandle): enable escape sequence on
	  Windows10 console to show `ruby --help` colors correctly.
2020-12-21 17:29:09 +09:00
Hiroshi SHIBATA
95ce5c0ee9 [ruby/rdoc] Bump version to 6.3.0
https://github.com/ruby/rdoc/commit/3d3616cb94
2020-12-21 16:22:08 +09:00
Hiroshi SHIBATA
391343e828 [ruby/rdoc] Guard for WEBrick
https://github.com/ruby/rdoc/commit/b1e7129e05
2020-12-21 16:21:46 +09:00
Takashi Kokubun
f26f905b28
Mark an ISeq being JIT-ed
This is to avoid SEGV on a CC reference in a normal compilation
https://github.com/ruby/ruby/runs/1586578023
2020-12-20 23:17:37 -08:00
Takashi Kokubun
1fdc97f1b7
Mark active_units
to avoid SEGV on mjit_recompile and compact_all_jit_code.

For some reason, ISeqs on stack are sometimes GC-ed (why?) and therefore
it may run mjit_recompile on a GC-ed ISeq, which I expected d07183ec85
to fix but apparently it may refer to random things if already GC-ed.
Marking active_units would workaround the situation.
http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3292740

Also, while compact_all_jit_code was executed, we saw some SEGVs where
CCs seemed to be already GC-ed, meaning their owner ISeq was not marked
properly. Even if units are still in active_units, it's not guaranteed
that their ISeqs are in use. So in this case we need to mark active_units
for a legitimate reason.
http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3293277
http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3293090
2020-12-20 22:58:45 -08:00
Takashi Kokubun
a574df14e4
Stop marking unit_queue
The original motivation of this marking was https://github.com/k0kubun/yarv-mjit/issues/20.
As wanabe said, there are multiple options to mitigate the issue, and
Eric Wong introduced another fix at 143776f6fe by checking unit->iseq
inside the lock.

Therefore this particular condition has been covered in two ways, and
the script given by wanabe no longer crashes without mjit_mark().
2020-12-20 22:03:20 -08:00
Kazuhiro NISHIYAMA
74a7877836
[DOC] Remove about FrozenError from Ractor::MovedObject [ci skip]
Because unfreeze Ractor::MovedObject at
76e8848037
2020-12-21 13:25:03 +09:00
Marc-Andre Lafortune
1ecac8e4d0 Add require_relative option to assert_ractor 2020-12-20 22:00:05 -05:00
Yusuke Endoh
eee93bc933 eval_error.c: fix off-by-one error for --backtrace-limit
https://bugs.ruby-lang.org/issues/17413
2020-12-21 11:40:48 +09:00
Hiroshi SHIBATA
ac78d90d5e
Bump bundled rake version to 13.0.3 2020-12-21 11:23:01 +09:00