aboutsummaryrefslogtreecommitdiffstats
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2991 from shyouhei/ruby.h卜部昌平2020-04-0890-33/+29358
| | | Split ruby.h
* Fix a typo [ci skip]Kazuhiro NISHIYAMA2020-04-031-1/+1
|
* [ruby/etc] Deprecate names under `Struct`Nobuyoshi Nakada2020-04-022-0/+13
| | | | https://github.com/ruby/etc/commit/25c538120c
* Revert "[ruby/etc] Deprecate names under `Struct`"Nobuyoshi Nakada2020-04-022-13/+0
| | | | | | This reverts commit 69f698d85ada116db5747873e53c597991bedff8. Again.
* Revert "[ruby/etc] Hack to get rid of linking against static library"Nobuyoshi Nakada2020-04-021-7/+1
| | | | | | This reverts commit 5885550c8cb80fb8784598d3af1d90823f4f6604. It didn't work without `--enable-shared`.
* [ruby/etc] Hack to get rid of linking against static libraryNobuyoshi Nakada2020-04-021-1/+7
|
* [ruby/etc] Deprecate names under `Struct`Nobuyoshi Nakada2020-04-022-0/+13
| | | | https://github.com/ruby/etc/commit/25c538120c
* Revert "[ruby/etc] Deprecate names under `Struct`"Nobuyoshi Nakada2020-04-012-13/+0
| | | | | | | | | This reverts commit 919b175afc389f8df6a3caa05ffdd28f5fc4bfca. Since 604689628dc64d050a68f1ebe5e06f9105474936, to let `try_run` work before LIBRUBY_SO is installed, `try_link` links against the static library which defines even symbols unexported in the shared library.
* [ruby/etc] Deprecate names under `Struct`Nobuyoshi Nakada2020-04-012-0/+13
| | | | https://github.com/ruby/etc/commit/25c538120c
* [ruby/etc] Drop binary gems supportNobuyoshi Nakada2020-04-011-1/+0
| | | | | | Revert "Added build:mingw" e1674c18f5a0faf881b362363f428d139baef3b4. https://github.com/ruby/etc/commit/d8f1dd85d3
* ext/socket/init.c: do not return uninitialized bufferYusuke Endoh2020-03-311-9/+8
| | | | | | | Resize string buffer only if some data is received in BasicSocket#read_nonblock and some methods. Co-Authored-By: Samuel Williams <samuel.williams@oriontransfer.co.nz>
* Clear all trace events during teardownAlan Wu2020-03-291-0/+8
| | | | | | | | | | | Since 0c2d81dada, not all trace events are cleared during VM teardown. This causes a crash when there is a tracepoint for `RUBY_INTERNAL_EVENT_GC_EXIT` active during teardown. The commit looks like a refactoring commit so I think this change was unintentional. [Bug #16682]
* The last argument of rb_rescue2() should always be (VALUE)0Benoit Daloze2020-03-281-4/+4
| | | | | * Otherwise it might segfault, since C has no idea of the type of varargs, and the C code must assume all varargs are VALUE.
* Show libffi version only if setNobuyoshi Nakada2020-03-211-1/+1
|
* [ruby/stringio] Bump version to 0.1.1Nobuyoshi Nakada2020-03-151-1/+1
| | | | https://github.com/ruby/stringio/commit/05d75e5e66
* [ruby/stringio] StringIO#initialize default to the source string encodingJean Boussier2020-03-151-4/+6
| | | | | | [Bug #16497] https://github.com/ruby/stringio/commit/4958a5ccab
* Add workaround for test-bundler failureKazuhiro NISHIYAMA2020-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/ruby/actions/runs/500526558?check_suite_focus=true#step:16:127 ``` Failures: 1) Bundler.setup when Bundler is bundled doesn't blow up Failure/Error: expect(err).to be_empty expected `"fatal: not a git repository (or any of the parent directories): .git\nfatal: not a git repository (o...the parent directories): .git\nfatal: not a git repository (or any of the parent directories): .git".empty?` to return true, got false Commands: $ /home/runner/work/actions/actions/snapshot-master/ruby \ -I/home/runner/work/actions/actions/snapshot-master/lib:/home/runner/work/actions/actions/snapshot-master/spec/bundler \ -rsupport/hax -rsupport/artifice/fail \ /home/runner/work/actions/actions/snapshot-master/libexec/bundle install --retry 0 Resolving dependencies... Using bundler 2.1.4 Bundle complete! 1 Gemfile dependency, 1 gem now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git # $? => 0 $ /home/runner/work/actions/actions/snapshot-master/ruby \ -I/home/runner/work/actions/actions/snapshot-master/lib:/home/runner/work/actions/actions/snapshot-master/spec/bundler \ -rsupport/hax -rsupport/artifice/fail \ /home/runner/work/actions/actions/snapshot-master/libexec/bundle exec ruby -e \ require\ \'bundler\'\;\ Bundler.setup fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git # $? => 0 # ./spec/bundler/runtime/setup_spec.rb:1056:in `block (3 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:111:in `block (3 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:111:in `block (2 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:78:in `block (2 levels) in <top (required)>' make: *** [yes-test-bundler] Error 1 ```
* openssl: sync with upstream repositoryKazuki Yamaguchi2020-03-1011-139/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import current master (2c43241dc0ed) of ruby/openssl.git. Below are the commits that were made since the last batch at commit b99775b163ce (ruby/openssl.git commit f49e7110ca1e). Note that some of them have been applied already. ---------------------------------------------------------------- Benoit Daloze (1): Remove redundant and ignored workflow file DBL-Lee (1): add support for SHA512_256/SHA512_224 Hiroshi SHIBATA (2): Guard for OpenSSL::PKey::EC::Group::Error with unsupported platforms Fixed inconsistency directory structure with ruby/ruby repo Jeremy Evans (2): Fix keyword argument separation issues in OpenSSL::SSL::SSLSocket#sys{read,write}_nonblock Remove taint support Kazuki Yamaguchi (26): config: support .include directive random: make OpenSSL::Random.pseudo_bytes alias of .random_bytes extconf.rb: get rid of -Werror=deprecated-declarations test/openssl/test_ssl: skip test_fallback_scsv if necessary ts: simplify OpenSSL::Timestamp::Request#algorithm History.md: add missing references to GitHub issues config: deprecate OpenSSL::Config#add_value and #[]= test/openssl/test_ssl: remove sleep from test_finished_messages test/openssl/test_ssl: fix random failure in SSLSocket.open test test/openssl/test_ssl: avoid explicitly-sized private keys test/openssl/test_ssl: remove commented-out test case test/openssl/test_ssl: allow kRSA tests to fail ssl: avoid declarations after statements engine: revert OpenSSL::Engine.load changes for cloudhsm engine: remove really outdated static engines engine: do not check for ENGINE_load_builtin_engines() engine: fix guards for 'dynamic' and 'cryptodev' engines lib/openssl.rb: require openssl/version.rb x509: add error code and verify flags constants ssl: set verify error code in the case of verify_hostname failure .github/workflows: merge CI jobs into a single workflow .github/workflows: test against different OpenSSL versions .travis.yml: fully migrate to GitHub Actions ssl: suppress test failure with SSLContext#add_certificate_chain_file ssl: remove test case test_puts_meta from test_pair Revert "Use version.rb in gemspec" MSP-Greg (2): .travis.yml - remove 2.3/1.0.2, 2.5/1.1.1, head/1.0.2 Use version.rb in gemspec Samuel Williams (1): Restore compatibility with older versions of Ruby. Yusuke Endoh (1): Make OpenSSL::OSSL#test_memcmp_timing robust
* digest: do not depend on ext/openssl/deprecation.rbKazuki Yamaguchi2020-03-101-2/+1
| | | | | | | | | | | | | | | | ext/openssl/deprecation.rb has been removed in ext/openssl upstream[1]. It was originally introduced to detect and prevent linking against Apple's bundled (and very outdated) version of OpenSSL. It is long gone and the header files do not exist in current versions of macOS. The dependency in ext/digest was introduced by commit 26e258c807c2. Note that the original issue[2] is resolved without this dependency. The commit also added the pkg_config("openss") call to match what ext/openssl does. [1] https://github.com/ruby/openssl/pull/333 [2] https://bugs.ruby-lang.org/issues/6379
* Do not set USE_FFI_CLOSURE_ALLOC=1 in fiddle on OpenBSDJeremy Evans2020-03-081-0/+4
| | | | | | | | On OpenBSD, USE_FFI_CLOSURE_ALLOC was always set to 0 previously. In 633a1f15d8228236094ddee12e4e169d655ec49e, the code was modified in a way that it ended up being set to 1 on OpenBSD. However, that results in SIGABRT when running make test-all, inside ffi_closure_free. Setting USE_FFI_CLOSURE_ALLOC back to 0 fixes the issue.
* Use osuosl instead of GitHub releasesHiroshi SHIBATA2020-03-071-3/+3
| | | | Because the package provided by GitHub releases is different from sourceware.
* Switch to download libffi source package to github releases from sourceware.orgHiroshi SHIBATA2020-03-071-3/+3
|
* Fixed a typoNobuyoshi Nakada2020-03-051-1/+1
|
* [ruby/fiddle] always use ffi_closure_alloc on WindowsNobuyoshi Nakada2020-03-051-1/+6
|
* [ruby/fiddle] use ffi_closure_alloc only with 3.2 or laterNobuyoshi Nakada2020-03-041-4/+2
|
* [ruby/fiddle] ffi_closure_free is available in the bundled libffiNobuyoshi Nakada2020-03-041-1/+3
|
* [ruby/fiddle] Use ffi_closure_free if availableNobuyoshi Nakada2020-03-042-6/+4
|
* Revert "Revert "Revert "[ruby/fiddle] Use ffi_closure_free by default. (#20)"""Yusuke Endoh2020-03-042-6/+42
| | | | | | | | | | | | | | | | | | | | This reverts commit 87f6154bb4c67ca77ee353bb1fe25a922036c0e5. It turned out that the change fails to build on macOS https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1014/ruby-master/log/20200304T074503Z.fail.html.gz ``` + make 'TESTS=--hide-skip -v fiddle' RUBYOPT=-w test-all dyld: lazy symbol binding failed: Symbol not found: _ffi_closure_alloc Referenced from: /Users/hsbt/Documents/cb/tmp/build/20200304T074503Z/ruby/.ext/x86_64-darwin18/fiddle.bundle Expected in: flat namespace dyld: Symbol not found: _ffi_closure_alloc Referenced from: /Users/hsbt/Documents/cb/tmp/build/20200304T074503Z/ruby/.ext/x86_64-darwin18/fiddle.bundle Expected in: flat namespace make: *** [yes-test-all] Abort trap: 6 ```
* Revert "Revert "[ruby/fiddle] Use ffi_closure_free by default. (#20)""Yusuke Endoh2020-03-042-42/+6
| | | | | | | | | | | | | | | This reverts commit efd641ffab34e433a8d8a7d78914576f2425aa90. This changeset seems to be needed to suppress a warning on Ubuntu 20.04 https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20200304T033004Z.log.html.gz ``` closure.c:264:5: warning: 'ffi_prep_closure' is deprecated: use ffi_prep_closure_loc instead [-Wdeprecated-declarations] 264 | result = ffi_prep_closure(pcl, cif, callback, (void *)self); | ^~~~~~ ``` I guess there was a reason why the commit was reverted (maybe some CIs failed?), so try it again.
* Add `#write` and `#binwrite` to IO section [ci skip]Kazuhiro NISHIYAMA2020-03-021-0/+2
|
* Suppress security alertsTakashi Kokubun2020-02-281-1/+1
| | | | https://github.com/advisories/GHSA-jppv-gw3r-w3q8
* should not expose hidden object.Koichi Sasada2020-02-291-7/+8
| | | | | | Hidden object (T_CLASS) can be exposed (BUG). Also rename rb_mInternalObjectWrapper to rb_cInternalObjectWrapper because it is a class.
* Merge racc from upstream repository.Hiroshi SHIBATA2020-02-271-1/+1
| | | | | * Support Ruby 2.4's frozen string literals. * Remove VCS revisions headers.
* ext/-test-/cxxanyargs: use try_link instead卜部昌平2020-02-251-1/+1
| | | | | We would like to skip this extension library when libstdc++ is missing. To avoid such situation let's use try_link instead of try_compile.
* Fix wrong documentation for return value of Pathname#fnmatchMasataka Pocke Kuwabara2020-02-251-2/+2
|
* Introduce disposable call-cache.Koichi Sasada2020-02-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains several ideas: (1) Disposable inline method cache (IMC) for race-free inline method cache * Making call-cache (CC) as a RVALUE (GC target object) and allocate new CC on cache miss. * This technique allows race-free access from parallel processing elements like RCU. (2) Introduce per-Class method cache (pCMC) * Instead of fixed-size global method cache (GMC), pCMC allows flexible cache size. * Caching CCs reduces CC allocation and allow sharing CC's fast-path between same call-info (CI) call-sites. (3) Invalidate an inline method cache by invalidating corresponding method entries (MEs) * Instead of using class serials, we set "invalidated" flag for method entry itself to represent cache invalidation. * Compare with using class serials, the impact of method modification (add/overwrite/delete) is small. * Updating class serials invalidate all method caches of the class and sub-classes. * Proposed approach only invalidate the method cache of only one ME. See [Feature #16614] for more details.
* VALUE size packed callinfo (ci).Koichi Sasada2020-02-221-0/+1
| | | | | | | | | | | | | | | | | | | | Now, rb_call_info contains how to call the method with tuple of (mid, orig_argc, flags, kwarg). Most of cases, kwarg == NULL and mid+argc+flags only requires 64bits. So this patch packed rb_call_info to VALUE (1 word) on such cases. If we can not represent it in VALUE, then use imemo_callinfo which contains conventional callinfo (rb_callinfo, renamed from rb_call_info). iseq->body->ci_kw_size is removed because all of callinfo is VALUE size (packed ci or a pointer to imemo_callinfo). To access ci information, we need to use these functions: vm_ci_mid(ci), _flag(ci), _argc(ci), _kwarg(ci). struct rb_call_info_kw_arg is renamed to rb_callinfo_kwarg. rb_funcallv_with_cc() and rb_method_basic_definition_p_with_cc() is temporary removed because cd->ci should be marked.
* ext/-test-/cxxanyargs: prevent have_devel check卜部昌平2020-02-201-2/+11
| | | | | | | The `cxx.try_compile` command in this file kicks `cxx.have_devel?` internally, which recursively calls `cxx.try_link` with a different source code. We don't want that happen (the source code compiled in this file must be the first one). We need to fake the system.
* [ruby/io-console] bump up to 0.5.6Nobuyoshi Nakada2020-02-181-1/+1
|
* [ruby/io-console] Just ignore the extension on other than CRubyNobuyoshi Nakada2020-02-181-3/+6
| | | | https://github.com/ruby/io-console/commit/41b6f09574
* [ruby/openssl] ts: simplify OpenSSL::Timestamp::Request#algorithmKazuki Yamaguchi2020-02-171-6/+1
| | | | | | | | | | | | | | | | Stop the special treatment of invalid hashAlgorithm of the message imprint. Those invalid values can only appear after the object is instantiated, before the user sets an actual message digest algorithm. OpenSSL::Timestamp::TokenInfo#algorithm already does the same. Also, remove the test case "test_create_request" since it does not make much sense. Those fields are to be set by the user after creation of the object and checking the initial value is pointless. Fixes: https://github.com/ruby/openssl/issues/335 https://github.com/ruby/openssl/commit/890a6476fa
* [ruby/io-console] [DOC] Improved about `intr:`Nobuyoshi Nakada2020-02-171-7/+10
| | | | https://github.com/ruby/io-console/commit/82b630cd79
* ext/openssl/extconf.rb: avoid -Werror=deprecated-declarationsYusuke Endoh2020-02-162-1/+6
| | | | | | | | | | | | | | | | | | | It fails to build on Solaris: https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11-gcc/ruby-master/log/20200216T090008Z.log.html.gz ``` ossl_cipher.c: 関数 ‘ossl_cipher_init’ 内: ossl_cipher.c:228:2: エラー: ‘EVP_md5’ is deprecated [-Werror=deprecated-declarations] 228 | EVP_BytesToKey(EVP_CIPHER_CTX_cipher(ctx), EVP_md5(), iv, | ^~~~~~~~~~~~~~ In file included from /usr/include/openssl/x509.h:73, from /usr/include/openssl/x509v3.h:63, from ossl.h:23, from ossl_cipher.c:10: /usr/include/openssl/evp.h:732:26: 備考: ここで宣言されています 732 | DEPRECATED const EVP_MD *EVP_md5(void); | ^~~~~~~ ```
* Import openssl-2.2.0 (#2693)Hiroshi SHIBATA2020-02-1640-238/+2454
| | | | Import the master branch of ruby/openssl for preparing to release openssl-2.2.0
* Workaround for bison provided by scoop on mswin environmentHiroshi SHIBATA2020-02-151-0/+1
|
* Fix call-seq of Pathname#{,l}ch{mod,own} [ci skip]Kazuhiro NISHIYAMA2020-02-151-4/+4
|
* [ruby/io-console] Prefer keyword argumentsNobuyoshi Nakada2020-02-141-0/+4
| | | | https://github.com/ruby/io-console/commit/5facbfc4c8
* Fix readline build dependencyAlan Wu2020-02-091-0/+1
|
* [ruby/readline-ext] Use rake/extensiokntask to buildaycabta2020-02-091-0/+4
| | | | https://github.com/ruby/readline-ext/commit/b0b5f709bd
* [ruby/readline-ext] Add spec.extensionsaycabta2020-02-091-0/+1
| | | | https://github.com/ruby/readline-ext/commit/8c33abb13c