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

61447 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA 35bbbc751d clean-up .bundle directory in bundled_app 2020-05-14 09:11:28 +09:00
Hiroshi SHIBATA d4acf254e3 Use the gemspec in build_dir directly 2020-05-14 09:11:28 +09:00
git 65c5a39578 * 2020-05-14 [ci skip] 2020-05-14 00:51:04 +09:00
Yusuke Endoh 8bd27c547c ext/json/parser/prereq.mk: remove type-limit warning if char is unsigned
Ragel generates a code `0 <= (*p)` where `*p` is char.
As char is unsigned by default on arm and RISC-V, it is warned by gcc:

```
compiling parser.c
parser.c: In function ‘JSON_parse_string’:
parser.c:1566:2: warning: comparison is always true due to limited range of data type [-Wtype-limits]
  if ( 0 <= (*p) && (*p) <= 31 )
  ^
parser.c:1596:2: warning: comparison is always true due to limited range of data type [-Wtype-limits]
  if ( 0 <= (*p) && (*p) <= 31 )
  ^
```

This change removes the warning by substituting the condition with
`0 <= (signed char)(*p)`.
2020-05-14 00:44:35 +09:00
Kazuki Yamaguchi 87662134b5 [ruby/openssl] Ruby/OpenSSL 2.2.0
https://github.com/ruby/openssl/commit/41587f69e1
2020-05-13 15:47:51 +09:00
Kazuki Yamaguchi cc26638cae [ruby/openssl] ssl: temporarily remove SSLContext#add_certificate_chain_file
Let's revert the changes for now, as it cannot be included in the 2.2.0
release.

My comment on #257:

> A blocker is OpenSSL::SSL::SSLContext#add_certificate_chain_file. It
> has a pending change and I don't want to include it in an incomplete
> state.
>
> The initial implementation in commit 46e4bdba40c5 was not really
> useful. The issue is described in #305. #309 extended it
> to take the corresponding private key together. However, the new
> implementation was incompatible on Windows and was reverted by #320 to
> the initial one.
>
> (The prerequisite to implement it in) an alternative way is #288, and
> it's still cooking.

This effectively reverts the following commits:

 - dacd08937ccd ("ssl: suppress test failure with SSLContext#add_certificate_chain_file", 2020-03-09)
 - 46e4bdba40c5 ("Add support for SSL_CTX_use_certificate_chain_file. Fixes #254.", 2019-06-13)

https://github.com/ruby/openssl/commit/ea925619a9
2020-05-13 15:47:51 +09:00
Kazuki Yamaguchi 6f008c9d2f [ruby/openssl] pkey: add PKey#inspect and #oid
Implement OpenSSL::PKey::PKey#oid as a wrapper around EVP_PKEY_id().
This allows user code to check the type of a PKey object.

EVP_PKEY can have a pkey type for which we do not provide a dedicated
subclass. In other words, an EVP_PKEY that is not any of {RSA,DSA,DH,EC}
can exist. It is currently not possible to distinguish such a pkey.

Also, implement PKey#inspect to include the key type for convenience.

https://github.com/ruby/openssl/commit/dafbb1b3e6
2020-05-13 15:47:51 +09:00
Bart de Water a7145c3de4 [ruby/openssl] Fix signing example to not use Digest instance
https://github.com/ruby/openssl/commit/033fb4fbe4
2020-05-13 15:47:51 +09:00
Bart de Water c85789f9b2 [ruby/openssl] Look up cipher by name instead of constant
https://github.com/ruby/openssl/commit/b08ae7e73d
2020-05-13 15:47:51 +09:00
Bart de Water b44cc9f040 [ruby/openssl] Remove 'mapping between Digest class and sn/ln'
This is not present in the referenced files anymore, and not useful to most users

https://github.com/ruby/openssl/commit/eae30d2b96
2020-05-13 15:47:51 +09:00
Bart de Water 0b2c70eaa1 [ruby/openssl] Look up digest by name instead of constant
https://github.com/ruby/openssl/commit/b28fb2f05c
2020-05-13 15:47:51 +09:00
Bart de Water 3f8665fe0e [ruby/openssl] Add Marshal support to PKey objects
https://github.com/ruby/openssl/commit/c4374ff041
2020-05-13 15:47:51 +09:00
Takashi Kokubun fcd2576290
Stop always inlining not-optimized get/setivar
As we have the optimization in _mjit_compile_ivar.erb, we don't use
these functions if we successfully optimize ivars. Therefore it's
consuming code size where we can't optimize it well.

To decrease code size, we'd better avoid inlining them.

```
$ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark.yml --repeat-count=12 --output=all
before --jit: ruby 2.8.0dev (2020-05-13T04:49:21Z master 61d451d6ce) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-05-13T05:46:59Z master a072d323db) +JIT [x86_64-linux]
Calculating -------------------------------------
                                 before --jit           after --jit
Optcarrot Lan_Master.nes     69.8567095356444      73.0360609399857 fps
                             70.3283101279035      74.6106251902062
                             72.9135395729567      75.2797344839106
                             76.6944690546044      77.5705757485036
                             77.0027971817715      78.2269524040059
                             78.5069033659736      78.4457471014131
                             80.1873218604913      80.1273811685818
                             81.3079566400696      81.7148593303302
                             81.7285827817226      81.7637234555871
                             81.7657097839637      82.4520295422720
                             81.8310114206406      82.7532354379759
                             81.9886488857863      82.8358739858206
```
2020-05-12 22:50:05 -07:00
Yusuke Endoh 61d451d6ce ext/bigdecimal/bigdecimal.c, ext/date/date_core.c: undef NDEBUG
`#define NDEBUG` produces "macro redefined" warnings when it is already
defined via cppflags
2020-05-13 13:49:21 +09:00
Yusuke Endoh 3bca1b6aad ext/openssl/ossl.h: Remove a variable that is used only in assert
It produces "unused variable" warnings in NDEBUG mode
2020-05-13 13:45:31 +09:00
Yusuke Endoh b68dab8667 ext/fiddle/extconf.rb: Fix the condition of libffi <= 3.1
ver is [3, 1, 0] which is not less then or equal to [3, 1]
2020-05-13 10:57:14 +09:00
Jeremy Evans de29a022ac Document that #hash is not called for certain core classes [ci skip]
Fixes [Bug #16850]
2020-05-12 18:01:16 -07:00
Yusuke Endoh 9cfa811b0f Do not try ffi_closure_alloc if libffi is <= 3.1
Maybe due to e1855100e4, CentOS, RHEL, and
Fedora CIs have started failing with SEGV.  Try to avoid
ffi_closure_alloc on those environments.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos8/ruby-master/log/20200512T183004Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/fedora32/ruby-master/log/20200512T183004Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20200512T183003Z.fail.html.gz
2020-05-13 08:42:48 +09:00
Hiroshi SHIBATA 777b5b4f39 Bump version to use RSpec 3.8+ 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA cecd343336 Skip the examples for bundle exec with gem installation 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA f61dbb921e Marked the some examples that are not working with the ruby repository 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA aecbb78517 Use relative path in ruby core repository 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA 143872bf98 Unmask the some of examples with ruby_repo label 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA ca892e6902 Skip the example to use rake command 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA ea517cfe23 skip lockfile_spec.rb:33 because it cleanup the .bundle repo 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA fcb5a9ee46 Resolved the file path of gemspec for ruby core repository 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA cf9619084b Bump version to use Rake 13 in bundler examples 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA 5b634afe4c Added test_gems.rb for setup dependencies 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA a7c1791cec Partly reverted bundler.gemspec for ruby core testing 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA 0e60b59d58 Update the bundler version with master branch 2020-05-13 07:54:37 +09:00
git 68224651a4 * 2020-05-13 [ci skip] 2020-05-13 01:24:17 +09:00
Yusuke Endoh e1855100e4 ext/fiddle/extconf.rb: check if ffi_closure_alloc is available
to define HAVE_FFI_CLOSURE_ALLOC.
The macro is used in closure.c, so have_func check is needed.

If pkg-config is not installed, extconf.rb fails to detect the version
of libffi, and does not add "-DUSE_FFI_CLOSURE_ALLOC=1" even when system
libffi version is >= 3.2.

If USE_FFI_CLOSURE_ALLOC is not defined, closure.c attempts to check if
HAVE_FFI_CLOSURE_ALLOC is defined or not, but have_func was removed with
528a3a1797, so the macro is always not
defined.

This resulted in this deprecation warning:

https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu2004/ruby-master/log/20200512T123003Z.log.html.gz
```
compiling closure.c
closure.c: In function 'initialize':
closure.c:265:5: warning: 'ffi_prep_closure' is deprecated: use ffi_prep_closure_loc instead [-Wdeprecated-declarations]
  265 |     result = ffi_prep_closure(pcl, cif, callback, (void *)self);
      |     ^~~~~~
In file included from ./fiddle.h:42,
                 from closure.c:1:
/usr/include/x86_64-linux-gnu/ffi.h:334:1: note: declared here
  334 | ffi_prep_closure (ffi_closure*,
      | ^~~~~~~~~~~~~~~~
```
2020-05-13 01:17:30 +09:00
Nobuyoshi Nakada 1c4eb70654
Build auxiliary program files early 2020-05-12 23:19:20 +09:00
Nobuyoshi Nakada 2383cdabc1
builtin_binary.inc: should be updated even if no changes [ci skip]
As this rule does not use a separate timestamp file, the target
will be rebuilt every time once it is outdated.
2020-05-12 23:07:42 +09:00
Nobuyoshi Nakada 02cb643ddb
Added String#split benchmark for empty regexp
|               |compare-ruby|built-ruby|
|:--------------|-----------:|---------:|
|re_chars-1     |    169.230k|  973.855k|
|               |           -|     5.75x|
|re_chars-10    |     25.536k|  107.598k|
|               |           -|     4.21x|
|re_chars-100   |      2.621k|   11.207k|
|               |           -|     4.28x|
|re_chars-1000  |     259.098|    1.133k|
|               |           -|     4.37x|
2020-05-12 22:59:58 +09:00
Nobuyoshi Nakada 693f7ab315 Optimize String#split
Optimized `String#split` with `/ /` (single space regexp) as
simple string splitting.  [ruby-core:98272]

|               |compare-ruby|built-ruby|
|:--------------|-----------:|---------:|
|re_space-1     |    432.786k|    1.539M|
|               |           -|     3.56x|
|re_space-10    |     76.231k|  191.547k|
|               |           -|     2.51x|
|re_space-100   |      8.152k|   19.557k|
|               |           -|     2.40x|
|re_space-1000  |     837.405|    2.022k|
|               |           -|     2.41x|

ruby-core:98272: https://bugs.ruby-lang.org/issues/15771#change-85511
2020-05-12 19:58:58 +09:00
Yusuke Endoh 2e7d886311 test/lib/jit_support.rb: Let JIT tests skip on centos8
It has the same issue as RHEL 8.  k0kubun said he will fix later
2020-05-12 17:48:31 +09:00
卜部昌平 b16acf8baa .github: use actions/checkout@v2 again 2020-05-12 17:15:22 +09:00
Nobuyoshi Nakada ee518cf077
Revert "Sync did_you_mean"
This reverts commit 946dadd3f4,
which broke `TestGemRequire` and others.
2020-05-12 16:27:25 +09:00
Nobuyoshi Nakada 317fdd6df2 fiddle: share the same config tools 2020-05-12 15:57:47 +09:00
Nobuyoshi Nakada 3150b97d32 extlibs.rb: links in extracted directory
Allow to create symbolic links (if available) to share same or
updated files.
2020-05-12 15:57:47 +09:00
Nobuyoshi Nakada d1748484e8 extlibs.rb: added variable references
Reduce duplicate parts such as package name and version numbers.
2020-05-12 15:57:47 +09:00
Kazuhiro NISHIYAMA 1d2fc91237
Add missing `,` 2020-05-12 13:25:22 +09:00
Stephen Touset 31af0dafba Expose SSLContext#extra_chain_cert in Net::HTTP
Currently, Net::HTTP can only send a single SSL certificate when it
establishes a connection. Some use-cases involve sending an entire
certificate chain to the destination; for this, SSLContext supports
assigning to #extra_chain_cert=.

This adds support in Net::HTTP for exposing this underlying SSLContext
property to end-users. [Feature #9758]
2020-05-12 12:55:04 +09:00
Yuki Nishijima 946dadd3f4 Sync did_you_mean 2020-05-11 23:25:04 -04:00
Kazuhiro NISHIYAMA 7cc55f4bc4
Thread#backtrace may return nil [ci skip] 2020-05-12 11:46:41 +09:00
Nobuyoshi Nakada 237bee9d40
Removed extra stringization
Argument of RUBY_ASSERT_FAIL is already stringized message, so no
more extra stringization should be applied.
2020-05-12 10:23:33 +09:00
Nobuyoshi Nakada 3fcf7f0271
win32/mkexports.rb: do not export internal symbols
Functions using `rb_thread_t` and `rb_execution_context_t` are
internal use only.
2020-05-12 10:02:39 +09:00
aycabta 7a7854d8c1 Some I/O in test doesn't have "position"
Just returns column 1 for ambiguous width because this I/O is not tty and can't
seek.
2020-05-12 02:53:44 +09:00
aycabta d39be242ba Also use pipe for input in test 2020-05-12 02:53:44 +09:00