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

58109 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 81191afe8a
Kernel#open may be redefined 2019-09-27 01:13:10 +09:00
Nobuyoshi Nakada 617fa3049a
NEWS: fixed markups and formatting [ci skip]
* got rid of inadvertent label lists.
* marked up resolve_feature_path method names.
* fixed indentation of UnboundMethod#bind_call and marked up as
  RDoc.
2019-09-27 00:48:48 +09:00
Nobuyoshi Nakada 876c5fe1b2
Check the argument size
Ensure that argument array size does not overflow as `int`, before
cast in thread_do_start after new thread created.
2019-09-27 00:38:12 +09:00
git 3b9cdc59ce * 2019-09-27 [ci skip] 2019-09-27 00:02:18 +09:00
Jeremy Evans 9556342838 Fix shorten-64-to-32 compile warnings/errors 2019-09-26 08:01:53 -07:00
Jeremy Evans b193041b99 Fix keyword argument separation issues in Fiber#resume 2019-09-26 08:01:53 -07:00
Jeremy Evans 6b52959ef7 Fix keyword argument separation issues in Thread.new 2019-09-26 08:01:53 -07:00
Jeremy Evans 47d44510a3 Fix more keyword argument separation issues in Pathname 2019-09-26 08:01:53 -07:00
Jeremy Evans 3959469f24 Fix keyword argument separation issues in OpenSSL::SSL::SSLSocket#sys{read,write}_nonblock
It's unlikely anyone would actually hit these.  The methods are
private, you only hit this code path if calling these methods
before performing the SSL connection, and there is already a
verbose warning issued.
2019-09-26 08:01:53 -07:00
Jeremy Evans 760893d2f8 Fix keyword argument separation issues in Proc#{<<,>>}
This requires adding rb_proc_call_with_block_kw.
2019-09-26 08:01:53 -07:00
Jeremy Evans 0aa267f985 Fix keyword argument sepration issues when IO#open calls #to_open 2019-09-26 08:01:53 -07:00
Jean Boussier 5b9d646944 Fix Module#name news and add a test 2019-09-26 23:29:49 +09:00
Nobuyoshi Nakada b29c68e687
Restore ENV, rubygems always sets SOURCE_DATE_EPOCH now 2019-09-26 22:57:25 +09:00
Nobuyoshi Nakada c4ec817a7a
Gem::Specification#to_ruby needs OpenSSL 2019-09-26 22:56:32 +09:00
Takashi Kokubun 41e3c204fd
Reduce ISeq size of mjit_exec benchmark
to avoid unwanted memory pressure
2019-09-26 22:13:31 +09:00
git 1070456bb8 * remove trailing spaces. [ci skip] 2019-09-26 20:25:42 +09:00
Jean Boussier 9d0866c7d7 [EXPERIMENTAL] Make Module#name return a frozen String
* Always the same frozen String for a given Module or Class.
    * Avoids extra allocations whenever calling Module#name.
    * See [Feature #16150]
2019-09-26 13:25:23 +02:00
Hiroshi SHIBATA c8f7168653
Revert the accidentally commits related GitHub Actions 2019-09-26 19:22:30 +09:00
Hiroshi SHIBATA 2a490d5660
Suppress assert_match warnings. 2019-09-26 18:24:20 +09:00
Hiroshi SHIBATA d4a86e407e
Assert warnings message for the last argument is keyword parameter. 2019-09-26 18:07:17 +09:00
David Rodríguez a2af473018
[rubygems/rubygems] Make sure our modifications to kernel.warn work
And test the fix we're adding.

https://github.com/rubygems/rubygems/commit/6f86637b98
2019-09-26 17:48:01 +09:00
David Rodríguez 54839f0173
[rubygems/rubygems] Fix jruby build
https://github.com/rubygems/rubygems/commit/cc255b774a
2019-09-26 17:48:01 +09:00
Hiroshi SHIBATA 966915d807
[rubygems/rubygems] indent
https://github.com/rubygems/rubygems/commit/8cdb2fd66f
2019-09-26 17:48:01 +09:00
Hiroshi SHIBATA 1eb503373e
[rubygems/rubygems] filter dependency type and name strictly.
Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>

https://github.com/rubygems/rubygems/commit/92892bbc3a
2019-09-26 17:48:01 +09:00
bronzdoc 0b65a7a19e
[rubygems/rubygems] Fix test_gem_attr
https://github.com/rubygems/rubygems/commit/7c5b66f9ef
2019-09-26 17:48:01 +09:00
David Rodríguez 4f87a1583d
[rubygems/rubygems] Introduce default prerelease requirement
https://github.com/rubygems/rubygems/commit/506c5bce49
2019-09-26 17:48:01 +09:00
David Rodríguez 6134fd7a64
[rubygems/rubygems] Remove comment not adding much
https://github.com/rubygems/rubygems/commit/b3b5c2d379
2019-09-26 17:48:01 +09:00
f 73633683c5
[rubygems/rubygems] add tests
https://github.com/rubygems/rubygems/commit/8a7e27381c
2019-09-26 17:48:01 +09:00
f 1fb44d2b8c
[rubygems/rubygems] Detect libc version, closes #2918
https://github.com/rubygems/rubygems/commit/1d18b12a26
2019-09-26 17:48:01 +09:00
David Rodríguez ea5b136155
[rubygems/rubygems] Fix underscore version for bundler itself
Previously it wouldn't play nice with the bundler version finder.

https://github.com/rubygems/rubygems/commit/d8bb81556d
2019-09-26 17:48:01 +09:00
Hiroshi SHIBATA ad638a713a
[rubygems/rubygems] Added jruby to matrix
https://github.com/rubygems/rubygems/commit/0832c079c8
2019-09-26 17:48:01 +09:00
Hiroshi SHIBATA 769a28d7dc
[rubygems/rubygems] Removed 2.2
https://github.com/rubygems/rubygems/commit/7fd2460f76
2019-09-26 17:48:01 +09:00
Hiroshi SHIBATA ba8fb735cb
[rubygems/rubygems] Added rvm workflow for Ruby 2.2 and 2.7
https://github.com/rubygems/rubygems/commit/d4ba75dfd2
2019-09-26 17:48:01 +09:00
Hiroshi SHIBATA 01c90f17d9
[rubygems/rubygems] Removed the needless configurations
https://github.com/rubygems/rubygems/commit/7134c49179
2019-09-26 17:48:01 +09:00
Hiroshi SHIBATA f5248f6f50
[rubygems/rubygems] Added the initial workflow file.
https://github.com/rubygems/rubygems/commit/6405a1e51a
2019-09-26 17:48:01 +09:00
bronzdoc 5c872b297c
[rubygems/rubygems] Avoid adding OpenSSL::PKey::RSA instances
https://github.com/rubygems/rubygems/commit/ba021fb4be
2019-09-26 17:48:01 +09:00
bronzdoc d1c97ceb86
[rubygems/rubygems] Update expectation in test_to_ruby_with_rsa_key
https://github.com/rubygems/rubygems/commit/2e65f7d4ae
2019-09-26 17:48:01 +09:00
bronzdoc 2e9c078707
[rubygems/rubygems] Fix indentation in case statement
https://github.com/rubygems/rubygems/commit/8ac0647659
2019-09-26 17:48:00 +09:00
bronzdoc 8f2379b0c5
[rubygems/rubygems] Make ruby_code method handle OpenSSL::PKey::RSA objects
https://github.com/rubygems/rubygems/commit/b1d825ab3a
2019-09-26 17:48:00 +09:00
Ellen Marie Dash 508afe2c26
[rubygems/rubygems] Set SOURCE_DATE_EPOCH env var if not provided.
Fixes #2290.

1. `Gem::Specification.date` returns SOURCE_DATE_EPOCH when defined,
2. this commit makes RubyGems set it _persistently_ when not provided.

This combination means that you can build a gem, check the build time,
and use that value to generate a new build -- and then verify they're
the same.

https://github.com/rubygems/rubygems/commit/d830d53f59
2019-09-26 17:48:00 +09:00
Daniel Berger 8436b2717c
[rubygems/rubygems] Add a gem attr to the Gem::Package class.
https://github.com/rubygems/rubygems/commit/5b81f364ae
2019-09-26 17:48:00 +09:00
Benoit Daloze 6ffc045a81 [EXPERIMENTAL] Make Symbol#to_s return a frozen String
* Always the same frozen String for a given Symbol.
* Avoids extra allocations whenever calling Symbol#to_s.
* See [Feature #16150]
2019-09-26 10:23:02 +02:00
Takashi Kokubun 4a4c502825
Add special runner to benchmark mjit_exec
I wanted to dynamically generate benchmark cases to test various number
of methods. Thus I added a dedicated runner of benchmark-driver.
2019-09-26 16:34:40 +09:00
Takashi Kokubun 5d8f112505
RubyVM::MJIT.pause(wait: true) should wait
for all compilations and compaction.

Prior to this commit, the last-compiled code has not been used because
MJIT worker is stopped before setting the code, and compaction has also
been skipped.

But it was not intentional and `wait: true` pause should wait until
those two things by its feature.
2019-09-26 16:28:34 +09:00
Alan Wu 47a234954a Rename STR_IS_SHARED_M to STR_BORROWED
Since the introduction of STR_SHARED_ROOT, the word "shared"
has become very overloaded with respect to String's internal
states. Use a different name for STR_IS_SHARED_M and explain
its purpose.
2019-09-26 15:30:18 +09:00
Alan Wu 93faa011d3 Tag string shared roots to fix use-after-free
The buffer deduplication codepath in rb_fstring can be used to free the buffer
of shared string roots, which leads to use-after-free.

Introudce a new flag to tag strings that at one point have been a shared root.
Check for it in rb_fstring to avoid freeing buffers that are shared by
multiple strings. This change is based on nobu's idea in [ruby-core:94838].

The included test case test for the sequence of calls to internal functions
that lead to this bug. See attached ticket for Ruby level repros.

[Bug #16151]
2019-09-26 15:30:18 +09:00
Nobuyoshi Nakada 3cee99808d [EXPERIMENTAL] Expression with modifier `in`
[Feature #15865]
2019-09-26 15:10:48 +09:00
Yusuke Endoh 1fe73dc860 include/ruby/ruby.h: suppress a false-positive warning of GCC
GCC emits a lot of false positives for rb_scan_args because:

* `rb_scan_args(argc, argv, "*:", NULL, &opts);` makes `n_mand == 0`,
* `n_mand == argc + 1` implies `argc == -1`, and
* `memcpy(ptr, argv, sizeof(VALUE)*argc);` explodes

However, we know that argc is never so big, thus this is a false
positive.  This change suppresses it by adding a condition `n_mand > 0`.

```
In file included from /usr/include/string.h:494,
                 from ./include/ruby/defines.h:145,
                 from ./include/ruby/ruby.h:29,
                 from ./include/ruby/encoding.h:27,
                 from dir.c:14:
In function 'memcpy',
    inlined from 'ruby_nonempty_memcpy.part.0' at ./include/ruby/ruby.h:1763:17,
    inlined from 'ruby_nonempty_memcpy' at ./include/ruby/ruby.h:1760:1,
    inlined from 'rb_scan_args_set' at ./include/ruby/ruby.h:2594:9,
    inlined from 'dir_s_aref' at dir.c:2774:12:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: '__builtin___memcpy_chk' pointer overflow between offset 0 and size [-8, 9223372036854775807] [-Warray-bounds]
   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning:
'__builtin___memcpy_chk' specified size 18446744073709551608 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
```
2019-09-26 11:35:01 +09:00
Nobuyoshi Nakada 5357ceb1ca
[ruby/io-console] Defer creating VT query string
https://github.com/ruby/io-console/commit/3d69c577a4
2019-09-26 09:59:27 +09:00
Nobuyoshi Nakada 9b10698705
[ruby/io-console] Added IO#console_mode
https://github.com/ruby/io-console/commit/77ed8d5a06
2019-09-26 09:59:27 +09:00