aboutsummaryrefslogtreecommitdiffstats
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* 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
* [ruby/readline-ext] The ruby/assert.h is adopted by Ruby 2.7 or lateraycabta2020-02-091-1/+0
| | | | https://github.com/ruby/readline-ext/commit/106c31fc1b
* [ruby/readline-ext] Remove unnecessary -I$(top_srcdir) when it's an ↵aycabta2020-02-091-1/+0
| | | | | | individual gem https://github.com/ruby/readline-ext/commit/efaca4a5f4
* Revert "[ruby/readline-ext] Include ruby/assert.h in ruby/ruby.h so that ↵aycabta2020-02-091-1/+0
| | | | | | | | assertions can be there" This reverts commit 425b2064d394639101854c83a061a0918b33b857. This cherry-pick was a mistake.
* more on NULL versus functions.卜部昌平2020-02-071-1/+1
| | | | | | Function pointers are not void*. See also ce4ea956d24eab5089a143bba38126f2b11b55b6 8427fca49bd85205f5a8766292dd893f003c0e48
* Add call-seq to Pathname#open from File.openKazuhiro NISHIYAMA2020-02-041-0/+7
| | | | | | | before: ``` open(p1 = v1, p2 = v2, p3 = v3) ```
* Fix linkage of popen_deadlock testMikhail Novosyolov2020-02-041-0/+1
| | | | | | | | DEBUG: BUILDSTDERR: /usr/bin/ld: infinite_loop_dlsym.o: in function `native_loop_dlsym': DEBUG: BUILDSTDERR: /builddir/build/BUILD/ruby-2.7.0/ext/-test-/popen_deadlock/infinite_loop_dlsym.c:16: undefined reference to `dlsym' DEBUG: BUILDSTDERR: collect2: error: ld returned 1 exit status Ruby was built with LibreSSL.
* fix delete unnecessary return卜部昌平2020-02-011-1/+1
| | | | Was my mistake to put return here.
* support C++ std::nullptr_t卜部昌平2020-01-311-0/+122
| | | | | | | C++ keyword `nullptr` represents a null pointer (note also that NULL is an integer in C++ due to its design flaw). Its type is `std::nullptr_t`, defined in <cstddef> standard header. Why not support it when the backend implementation can take a null pointer as an argument.
* Return the makefile contentNobuyoshi Nakada2020-01-311-0/+1
| | | | | Block for `create_makefile` is expected to return the content of the makefile.
* Move .IGNORE in extconf.rbNARUSE, Yui2020-01-312-3/+1
|
* Support nmakeNARUSE, Yui2020-01-311-0/+2
|
* Ignore expected errors on compiling C++ source [Bug #16331]NARUSE, Yui2020-01-311-0/+1
| | | | | | | | | | | | | | BSD make can run parallel more aggressively than GNU make. It communicate with other make process through -J option in MAKEFLAGS environment variable to notify a build failure happend in an other pararell make process. https://www.freebsd.org/cgi/man.cgi?make It usually works well but ext/-test-/cxxanyargs/Makefile has two targets which are expected to fail (failure.o and failurem1.o). Additional note: To test and debug this issue, following command will speed up it. `make -f exts.mk -j8 clean all`
* fix rb_define_global_function to take const VALUE*卜部昌平2020-01-281-0/+70
| | | | | It was unable for rb_define_global_function to take VALUE(*)(int argc, const VLAUE *argv, VALUE self) -style function. Test added.