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

63617 Коммитов

Автор SHA1 Сообщение Дата
Yusuke Endoh d42c68e912 Bundle TypeProf 0.4.0 2020-11-04 17:07:01 +09:00
Hiroshi SHIBATA f211f9cda4
use https 2020-11-04 13:30:27 +09:00
卜部昌平 ae53fda013 .travis.yml: delete x86_64
Is already covered by Github Actions.
2020-11-04 12:11:13 +09:00
卜部昌平 4c6700964d .travis.yml: delete sanitizer tests
They were not working.
2020-11-04 12:11:13 +09:00
卜部昌平 8eca97c049 .github/workflows/baseruby.yml: add
Translate a part of .travis.yml into a Github Actions workflow.
2020-11-04 12:11:13 +09:00
Jeremy Evans bf1047c757 Update NEWS for Array methods change 2020-11-03 14:09:20 -08:00
Jeremy Evans 2a294d499b
Make Array methods return Array instances instead of subclass instances
This changes the following methods to return Array instances instead
of subclass instances:

* Array#drop
* Array#drop_while
* Array#flatten
* Array#slice!
* Array#slice/#[]
* Array#take
* Array#take_while
* Array#uniq
* Array#*

Fixes [Bug #6087]
2020-11-03 14:01:38 -08:00
git 7d6c72dc06 * 2020-11-04 [ci skip] 2020-11-04 00:55:00 +09:00
Kazuki Tsujimoto 700637570f
Rightward assignment is replaced by one-line pattern matching 2020-11-04 00:51:44 +09:00
Yusuke Endoh c3e2dd072a test/ruby/test_gc_compact.rb: suppress "assigned but unused variable" 2020-11-03 23:32:40 +09:00
Kazuhiro NISHIYAMA fa7484019d
Add links to the tickets [ci skip] 2020-11-03 10:25:52 +09:00
Luciano Sousa 4f7d27a210 Fix typo in the auto compact announcement [ci-skip]
I'm sorry, but I think there is a typo here.

This fix will help folks who are trying to translate this announcement to other languages. I hope this is not a joke and I didn't get it 🙏
2020-11-02 16:48:21 -08:00
git 46f3b68fbf * 2020-11-03 [ci skip] 2020-11-03 07:43:29 +09:00
Aaron Patterson 67b2c21c32
Add `GC.auto_compact= true/false` and `GC.auto_compact`
* `GC.auto_compact=`, `GC.auto_compact` can be used to control when
  compaction runs.  Setting `auto_compact=` to true will cause
  compaction to occurr duing major collections.  At the moment,
  compaction adds significant overhead to major collections, so please
  test first!

[Feature #17176]
2020-11-02 14:42:48 -08:00
Nobuyoshi Nakada 79b242260b
ripper: Invalid pragma value warning 2020-11-02 22:49:42 +09:00
Nobuyoshi Nakada 539b89075a
Compare boolean values for parser pragma locale-insensitively 2020-11-02 18:24:45 +09:00
Nobuyoshi Nakada bdcfa70bbd
strip trailing spaces [ci skip] 2020-11-02 17:31:50 +09:00
Koichi Sasada 5fefb53249 Copy for Ractor.send() without marshal.
Now copying objects do not need marshal protocol.
2020-11-02 03:31:58 +09:00
git 1581da9993 * 2020-11-02 [ci skip] 2020-11-02 01:37:56 +09:00
Koichi Sasada db7a3b63ba suppport Ractor.send(move: true) for more deta
This patch allows to move more data types.
2020-11-02 01:37:28 +09:00
Kazuki Tsujimoto 963359a762
Use the suppress_warning helper instead of doing it manually 2020-11-01 19:00:22 +09:00
Kazuki Tsujimoto 7282f3113d
Suppress "One-line pattern matching is experimental" warning 2020-11-01 18:19:58 +09:00
Kazuki Tsujimoto e0e2492cd3
Fix Rubyspec (ruby-2.7) failures
https://github.com/ruby/ruby/runs/1337845174
2020-11-01 17:37:03 +09:00
Kazuki Tsujimoto e03e1982bd
Change NODE layout for pattern matching
I prefer pconst to be the first element of NODE.

  Before:

       | ARYPTN | FNDPTN | HSHPTN
    ---+--------+--------+-----------
    u1 | imemo  | imemo  | pkwargs
    u2 | pconst | pconst | pconst
    u3 | apinfo | fpinfo | pkwrestarg

  After:

       | ARYPTN | FNDPTN | HSHPTN
    ---+--------+--------+-----------
    u1 | pconst | pconst | pconst
    u2 | imemo  | imemo  | pkwargs
    u3 | apinfo | fpinfo | pkwrestarg
2020-11-01 16:19:07 +09:00
Rei Odaira 305c79af2f ext/socket/rubysocket.h: avoid the conflict of T_DATA definition in AIX 2020-11-01 00:12:55 -05:00
Koichi Sasada 0e33028d69 use one-line pattern matching for warning tests 2020-11-01 13:55:54 +09:00
git b1e7c3a31f * 2020-11-01 [ci skip] 2020-11-01 13:36:02 +09:00
Kazuki Tsujimoto b601532411
Pattern matching is no longer experimental 2020-11-01 13:33:58 +09:00
wanabe 4f8d9b0db8 Revert "Use adjusted sp on `iseq_set_sequence()`" and "Delay `remove_unreachable_chunk()` after `iseq_set_sequence()`"
This reverts commit 3685ed7303 and 5dc107b03f.
Because of some CI failures https://github.com/ruby/ruby/pull/3404#issuecomment-719868313.
2020-10-31 11:56:41 +09:00
Nobuyoshi Nakada ea8fc7fdd3
[DOC] standard_library.rdoc: tweaked to make style consistent
[ci skip]
2020-10-31 11:06:01 +09:00
Nobuyoshi Nakada dd2f99d94a
Removed unused variable 2020-10-31 10:51:57 +09:00
wanabe 3685ed7303 Use adjusted sp on `iseq_set_sequence()` 2020-10-31 09:18:37 +09:00
wanabe 5dc107b03f Delay `remove_unreachable_chunk()` after `iseq_set_sequence()` 2020-10-31 09:18:37 +09:00
Alan Wu 670e288d65 Add warning for str_new_static functions
Many functions in string.c assume that capa + termlen to be readable
memory. Add comment in header to communicate this to extension authors.

See also: comment in str_fill_term()
2020-10-30 19:47:14 -04:00
Alan Wu 520b86caf1 Move variable closer to usage 2020-10-30 19:34:41 -04:00
Marc-Andre Lafortune bd6cd85155 Tweak return of `Ractor#close`, add doc 2020-10-30 15:22:18 -04:00
git 7c548278f0 * 2020-10-31 [ci skip] 2020-10-31 01:48:24 +09:00
Koichi Sasada fd08927699 Ractor's "will" doesn't need copying.
`r = Ractor.new{ expr }` generates the block return value from `expr`
and we can get this value by `r.take`. Ractor.yield and Ractor#take
passing values by copying on default. However, the block return value
(we named it "will" in the code) is not referred from the Ractor
because the Ractor is already dead. So we can pass the reference
of "will" to another ractor without copying. We can apply same story
for the propagated exception.
2020-10-31 01:48:00 +09:00
Hiroshi SHIBATA 66bf743b93
Promote debug.rb to default gems.
It have no upstream repo yet. This change is experimental for 3.0.0-preview2.
2020-10-30 21:45:23 +09:00
Koichi Sasada 89c8ca32d0 add a test of define_method with shareable Proc.
a method defined by define_method with normal Proc can not cross
ractors because the normal Proc is not shareable. However,
shareable Proc can be crossed between ractors, so the method with
shareable Proc should be called correctly.
2020-10-30 16:52:09 +09:00
Koichi Sasada 08ddc335ea sync vm->waiting_fds correctly.
vm->waiting_fds is global resource so we need to lock it correctly.
(forgot to sync one place)
2020-10-30 16:52:09 +09:00
Hiroshi SHIBATA a1828a1ff4
Promote win32ole to default gems.
But win32ole gem is still experimental for 3.0.0-preview2.
  I'm working to extract this library on https://github.com/ruby/win32ole.
2020-10-30 15:18:50 +09:00
Kazuhiro NISHIYAMA 17c6b6b16e
Fix a typo [ci skip] 2020-10-30 12:30:45 +09:00
Nobuyoshi Nakada 799253dc46
strip trailing spaces [ci skip] 2020-10-30 12:26:59 +09:00
Koichi Sasada 5d97bdc2dc Ractor.make_shareable(a_proc)
Ractor.make_shareable() supports Proc object if
(1) a Proc only read outer local variables (no assignments)
(2) read outer local variables are shareable.

Read local variables are stored in a snapshot, so after making
shareable Proc, any assignments are not affeect like that:

```ruby
a = 1
pr = Ractor.make_shareable(Proc.new{p a})
pr.call #=> 1
a = 2
pr.call #=> 1 # `a = 2` doesn't affect
```

[Feature #17284]
2020-10-30 03:12:09 +09:00
git 502d6d8459 * 2020-10-30 [ci skip] 2020-10-30 00:09:12 +09:00
Jeremy Evans c0aeb98aa9 Make ENV.replace handle multiple environ entries with the same key
While it is expected that all environment keys are unique, that is
not enforced. It is possible by manipulating environ directly you
can call a process with an environment with duplicate keys.  If
ENV.replace was passed a hash with a key where environ had a
duplicate for that key, ENV.replace would end up deleting the key
from environ.

The fix in this case is to not assume that the environment key
list has unique keys, and continue processing the entire key
list in keylist_delete.

Fixes [Bug #17254]
2020-10-29 08:08:42 -07:00
Koichi Sasada 07c03bc309 check isolated Proc more strictly
Isolated Proc prohibit to access outer local variables, but it was
violated by binding and so on, so they should be error.
2020-10-29 23:42:55 +09:00
Nobuyoshi Nakada bf951c763d
An ellipsis (...) can only be placed at the beginning 2020-10-29 18:14:27 +09:00
Aaron Patterson 9f3adaf529 Use public allocators for creating new T_OBJECT objects
This way the header flags and object internals are set correctly
2020-10-28 18:35:22 -07:00