Commit graph

64552 commits

Author SHA1 Message Date
Benoit Daloze
738a089b3a Rename scheduler.{mutex_lock,mutex_unlock} to {block,unblock}
* Move #kernel_sleep next to #block as it is similar
2020-09-17 14:30:40 +02:00
Benoit Daloze
c3acfcc78d Use a similar pattern for waiting and ready 2020-09-17 14:14:49 +02:00
Kazuhiro NISHIYAMA
e4dbb91f4c
Fix typos [ci skip]
s/overriden/overridden/
2020-09-17 20:34:59 +09:00
Kazuhiro NISHIYAMA
63a4f2f93f
Sort links in NEWS.md by URI [ci skip] 2020-09-17 20:30:59 +09:00
Benoit Daloze
3f6c0a6d74 Update to ruby/spec@e829fb0 2020-09-17 11:42:26 +02:00
Benoit Daloze
ce888bfa23 Add NEWS entry for [Feature #16792] 2020-09-17 11:17:07 +02:00
git
2e6c484040 * 2020-09-17 [ci skip] 2020-09-17 05:52:45 +09:00
Chris Seaton
8e173d8b27 Warn on a finalizer that captures the object to be finalized
Also improve specs and documentation for finalizers and more clearly
recommend a safe code pattern to use them.
2020-09-16 13:52:24 -07:00
Samuel Williams
f75009c122 Prefer to use prep_io for temporary IO instances. 2020-09-17 00:31:04 +12:00
Kenta Murata
68b5f14d53
Fix assertion failed in Complex.polar without NDEBUG (#3551)
Fixes [Bug #17172].
2020-09-16 19:27:16 +09:00
Benoit Daloze
10290da54d Add a note at the top of the test scheduler 2020-09-16 11:37:06 +02:00
Benoit Daloze
9e813c1fc4 RUBY_ISEQ_DUMP_DEBUG=to_binary never kept the debug information for String literals
* That is, for plain string literals, not interpolated.
* The test below is very similar and uses the same check.
2020-09-16 11:17:23 +02:00
Benoit Daloze
9d8eeccf06 Revert "skip on RUBY_ISEQ_DUMP_DEBUG=to_binary"
This reverts commit 889bbbaf52.
2020-09-16 10:39:27 +02:00
Koichi Sasada
889bbbaf52 skip on RUBY_ISEQ_DUMP_DEBUG=to_binary
9b535f3ff7 does not support ISeq#to_binary.
To make CI green, skip this test temporarily.

Please fix this issue and revert this patch.
2020-09-16 15:44:26 +09:00
Hiroshi SHIBATA
344304c89f
Use build_message on test_securerandom.rb (#3543)
* Revert "Revert "[ruby/securerandom] Use build_message instead of message for test-unit""
* [ruby/securerandom] Fixed the wrong usage of build_message
2020-09-16 07:45:01 +09:00
Benoit Daloze
1af0319fc8 2.8 -> 3.0 in specs 2020-09-15 21:56:00 +02:00
Benoit Daloze
9b535f3ff7 Interpolated strings are no longer frozen with frozen-string-literal: true
* Remove freezestring instruction since this was the only usage for it.
* [Feature #17104]
2020-09-15 21:32:35 +02:00
Jean Boussier
fbba6bd4e3 Parse ObjectSpace.dump_all / dump arguments in Ruby to avoid allocation noise
[Feature #17045] ObjectSpace.dump_all should allocate as little as possible in the GC heap

Up until this commit ObjectSpace.dump_all allocates two Hash because of `rb_scan_args`.

It also can allocate a `File` because of `rb_io_get_write_io`.

These allocations are problematic because `dump_all` dumps the Ruby
heap, so it should try modify as little as possible what it is
observing.
2020-09-15 09:18:13 -07:00
git
a0d50465de * 2020-09-16 [ci skip] 2020-09-16 01:09:49 +09:00
Aaron Patterson
86087a1527 pointers on the stack need to be pinned 2020-09-15 09:09:25 -07:00
Hiroshi SHIBATA
ee10efdcf0
Revert "[ruby/securerandom] Use build_message instead of message for test-unit"
This reverts commit 7f9f5f5723.
2020-09-15 21:44:59 +09:00
Jeremy Evans
abbd324152 [ruby/uri] Remove deprecated URI.escape/URI.unescape
61c6a47ebf
2020-09-15 21:17:20 +09:00
Hiroshi SHIBATA
7f9f5f5723 [ruby/securerandom] Use build_message instead of message for test-unit
826b877e83
2020-09-15 21:07:27 +09:00
Ashwin Maroli
3dd9e12b51 [ruby/fileutils] Reduce iteration through list for :mkdir_p
By calling the instruction to `list.map` within `list.each` itself.
e690eec937
2020-09-15 20:32:13 +09:00
Samuel Williams
026ba68c10 Fix handling of FMODE_PREP. 2020-09-15 22:53:08 +12:00
Samuel Williams
a9b2a96c5c Fix incorrect initialization of rb_io_t::self. 2020-09-15 22:53:08 +12:00
Kazuhiro NISHIYAMA
b2b855f486
Fix warning: instance variable bt_locations not initialized 2020-09-15 14:03:41 +09:00
Kazuhiro NISHIYAMA
f3754dfc2e
Fix missing " [ci skip] 2020-09-15 14:03:22 +09:00
aycabta
29b1ac613b Add IRB and Reline update for NEWS of 3.0.0-preview1 2020-09-15 09:40:24 +09:00
Marc-Andre Lafortune
60f5d38482 [ruby/ostruct] Fix dup/clone 2020-09-14 16:10:37 -04:00
Marc-Andre Lafortune
125605abd9 [ruby/ostruct] method_missing is private 2020-09-14 16:10:37 -04:00
Marc-Andre Lafortune
606c009ce2 [ruby/ostruct] Avoid self calling our public methods.
Found because `json` has a bad example in its test suite.
This implementation still offers better encapsulation.
2020-09-14 16:10:37 -04:00
Marc-Andre Lafortune
67e5f7a9e5 [ruby/ostruct] Reinstate recent changes
This reverts commit 28e60b0045.
2020-09-14 16:10:37 -04:00
Marc-Andre Lafortune
39312cf4d6 Optimize Pathname#relative? / absolute? 2020-09-14 14:18:23 -04:00
Marc-Andre Lafortune
28e60b0045 [ruby/ostruct] Revert recent changes
This reverts commit e026e186f4..12a2e32d43.
2020-09-14 13:29:54 -04:00
Marc-Andre Lafortune
867f0c6793 [ruby/rdoc] Prefer require_relative 2020-09-14 12:59:11 -04:00
Marc-Andre Lafortune
12a2e32d43 [ruby/ostruct] Add access to public instance methods in case they are overriden 2020-09-14 12:46:51 -04:00
Marc-Andre Lafortune
12a13eef49 [ruby/ostruct] Tweak doc 2020-09-14 12:46:49 -04:00
Marc-Andre Lafortune
8eefa8f373 [ruby/ostruct] Allow overriding public methods
[Fixes https://bugs.ruby-lang.org/issues/15409]
2020-09-14 12:46:47 -04:00
Marc-Andre Lafortune
ebb8de7302 [ruby/ostruct] Refactor handling of frozen OpenStruct. Simplify new_ostruct_member! 2020-09-14 12:46:45 -04:00
Marc-Andre Lafortune
5e7ec05319 [ruby/ostruct] Add really basic test that was missing 2020-09-14 12:46:43 -04:00
Marc-Andre Lafortune
e026e186f4 [ruby/ostruct] Revert "ostruct.rb: deferred accessors"
This reverts commits:
dc38e99813
22c082fcfd
b499e0f9ff
58e5876646

Add test for overriden private methods

[Fixes https://bugs.ruby-lang.org/issues/12136]
2020-09-14 12:46:27 -04:00
git
1cabb216c6 * 2020-09-15 [ci skip] 2020-09-15 00:05:28 +09:00
Koichi Sasada
e81d7189a0 sync fstring pool
fstring pool should be sync with other Ractors.
2020-09-15 00:04:59 +09:00
Koichi Sasada
74ddac1c82 relax dependency
vm_sync.h does not need to include vm_core.h and ractor_pub.h.
2020-09-15 00:04:59 +09:00
Koichi Sasada
f7ccb8dd88 restart Ractor.select on intterupt
signal can interrupt Ractor.select, but if there is no exception,
Ractor.select should restart automatically.
2020-09-15 00:04:59 +09:00
Nobuyoshi Nakada
edb5c67195 [ruby/tmpdir] Warn when environment variables skipped (fixes #2)
af7b020a89
2020-09-14 18:22:37 +09:00
Nobuyoshi Nakada
df1c035d03 [ruby/tmpdir] Test "not writable" case
84684d80f9
2020-09-14 18:22:19 +09:00
Nobuyoshi Nakada
04de778ef1 [ruby/tmpdir] Test "not a directory" cases
f335f2c23e
2020-09-14 18:22:09 +09:00
Nobuyoshi Nakada
f7f849e30c [ruby/tmpdir] Test also TMP and TEMP environment variables
414c00ebe6
2020-09-14 18:21:59 +09:00