aboutsummaryrefslogtreecommitdiffstats
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* dbm.c: suppress unused-but-set-variable warningnobu2017-09-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gdbm.c: use the default external encodingnobu2017-09-301-7/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dbm.c: removed useless assignmentsnobu2017-09-301-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext: check if null byte is containednobu2017-09-307-22/+25
| | | | | | [ruby-dev:50267] [Bug #13953] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ripper/lexer.rb: remove double quotesnobu2017-09-301-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.acnobu2017-09-291-2/+2
| | | | | | | | | | | * configure.ac: renamed configure.in. [Feature #13946] * Makefile.in, common.mk, ext/rbconfig/sizeof/depend: use configure.ac. * README.ja.md, README.md: update document for configure.ac. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* pty.c: shrink repeated device namesnobu2017-09-271-40/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* objspace_dump.c: remove unnecessary breaknobu2017-09-271-14/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext: adjust indent [ci skip]nobu2017-09-276-59/+59
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: import e72d960db262rhe2017-09-246-40/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync with master branch of ruby/openssl.git to import changes in v2.1.0.beta1..v2.0.6. The commit log since v2.1.0.beta1 which was imported by r59734 can be found at: https://github.com/ruby/openssl/compare/v2.1.0.beta1...e72d960db262 ---------------------------------------------------------------- Kazuki Yamaguchi (16): test/test_pair: fix test_write_nonblock{,_no_exceptions} x509name: fix a typo in docs test/test_fips: skip if setting FIPS mode fails test/test_asn1: fix possible failure in test_utctime test/test_ssl: suppress warning in test_alpn_protocol_selection_cancel test/test_pair: disable compression test/test_ssl: skip tmp_ecdh_callback test for LibreSSL >= 2.6.1 test/test_ssl: do not run NPN tests for LibreSSL >= 2.6.1 tool/ruby-openssl-docker: update test/test_pair: replace sleep with IO.select ssl: prevent SSLSocket#sysread* from leaking uninitialized data ossl.c: use struct CRYPTO_dynlock_value for non-dynamic locks ossl.c: make legacy locking callbacks reentrant test/test_engine: suppress stderr test/test_engine: check if RC4 is supported Ruby/OpenSSL 2.0.6 SHIBATA Hiroshi (1): To use upstream url of github nobu (1): ruby.h: unnormalized Fixnum value git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* load.c: fix rb_load_protect conditionnobu2017-09-242-0/+20
| | | | | | | * load.c (rb_load_protect): fix the condition to load the found file. fixup of r59155. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Added sections of pysch library to LEGAL.hsbt2017-09-231-19/+0
| | | | | | | * ext/psych/yaml/LICENSE: Integrate libyaml license to LEGAL and removed this file from repository. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix up r59949nobu2017-09-201-0/+2
| | | | | | | * ext/ripper/lib/ripper/lexer.rb (List#inspect): splat self data to local variables same as members of Elem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixup r59961. Use http for libffi downloading.hsbt2017-09-191-1/+1
| | | | | | | | A few environments couldn't handle https download. * https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20170919T032511Z.fail.html.gz * https://rubyci.org/logs/www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20170919T040500Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use https instead of ftp for libffi downloading.hsbt2017-09-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: ripper_lex_state_namenobu2017-09-181-0/+27
| | | | | | | | | | * parse.y (ripper_lex_state_name): represent lex_state as OR-ed form. * ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer::Elem#to_a): lex_state for inspection. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/objspace/objspace.c: remove unneeded code clones.mame2017-09-171-22/+1
| | | | | | `setup_hash` have already performed nil check and empty check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/io/console/lib/console/size.rb: Fix the context of method definitionmame2017-09-171-1/+1
| | | | | | `console_size` is not a instance method but a class method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/date/extconf.rb: check for timezone and altzonerhe2017-09-172-2/+7
| | | | | | | | Instead of in configure.in. As of r28592 the HAVE_VAR_TIMEZONE and HAVE_VAR_ALTZONE macros are only used by ext/date. ext/date doesn't care whether they are int or long, so just check for the existence. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* To use github url for gemspec.hsbt2017-09-155-5/+5
| | | | | | [Bug #13906][ruby-core:82817] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/coverage/coverage.c (rb_coverage_start): Ensure `opt` is a hashyui-knk2017-09-151-0/+2
| | | | | | | | Ensure `opt` is a hash before using `rb_hash_lookup` to `opt`. This will prevent SEGV when an inappropriate object (i.e. an array) is passed to `opt`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ripper: add states of scannernobu2017-09-143-20/+43
| | | | | | | | | | | * parse.y (ripper_state): add states of scanner to tokens from Ripper.lex and Ripper::Filter#on_*. based on the patch by aycabta (Code Ahss) at [ruby-core:81789]. [Feature #13686] * ext/ripper/tools/preproc.rb (prelude, usercode): generate EXPR_* constants from enums. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/coverage/coverage.c: use long instead of int for coverage site idmame2017-09-141-5/+7
| | | | | | | | Coverage generates unique ID numbers for each branch and each method. Use long instead of int for the IDs. I don't want to see 2^32 branches and methods in one file, but just in case... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/coverage/coverage.c (method_coverage): `id` was used uninitializedmame2017-09-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add method coveragemame2017-09-141-1/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Removed needless operator.hsbt2017-09-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add branch coverage for if statementmame2017-09-141-1/+26
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/coverage/coverage.c: Fix the condition for non-experimental modemame2017-09-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [EXPERIMENTAL] Extend the API of `Coverage.start` and `result`mame2017-09-141-8/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | The old API: Coverage.start load "foo.rb" p Coverage.result #=> {"foo.rb" => [1, 2, nil]} The new API: ENV["COVERAGE_EXPERIMENTAL_MODE"] = "true" Coverage.start(lines: true) load "foo.rb" p Coverage.result #=> {"foo.rb" => {:lines => [1, 2, nil]}} This new API allows us to add other measuring target types. Notes: * To keep compatibility, the old interface is still remained; passing no optional argument makes `Coverage.result` return the old format. * This feature is still experimental. So, to enable the new API, the environment variable `COVERAGE_EXPERIMENTAL_MODE` must be set. I plan to activate this feature by Ruby 2.5. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update gemspec for gem released versions.hsbt2017-09-147-35/+61
| | | | | | | * These are dbm, fcntl, io-console, sdbm, stringio, strscan, zlib, cmath, scanf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge fiddle-1.0.0.beta2 from upstream.hsbt2017-09-1213-19/+19
| | | | | | | | | * ext/fiddle/closure.c: use directly declaration for standalone gem without internal.h. * Specify frozen string literal is true. * Update gemspec configuration for release version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* console.c: set winsize on Windowsnobu2017-09-111-9/+14
| | | | | | | * ext/io/console/console.c (console_set_winsize): retry shrinking window and screen buffer. [ruby-core:82741] [Bug #13888] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sprintf.c: NULL as strnobu2017-09-091-0/+8
| | | | | | | * sprintf.c (ruby_vsnprintf, ruby_snprintf): allow NULL as str, just count the expected buffer size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: unnormalized Fixnum valuenobu2017-09-073-3/+3
| | | | | | | * include/ruby/ruby.h (ST2FIX): fix unnormalized Fixnum value bug on mingw/mswin. [ruby-core:82687] [Bug #13877] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Improve line covearge of ext/io/nonblock/nonblock.c from 54.5% to 95.5%mame2017-09-041-1/+1
| | | | | | Not so good test, but it would be better than nothing, I guess... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Refactor the internal data format for coverage measurementmame2017-09-031-4/+7
| | | | | | | | | | | To prepare new measuring targets: branch and method coverages. So far, iseq->coverage was an array of counts executed for line coverage. Now, it is a three-element array for each measuring target, whose first element is an array for line coverage. The second element is planned for branch coverage, and the third will be for method coverage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/.document: follow-up r59734rhe2017-09-031-1/+1
| | | | | | ext/openssl/ossl_pkcs5.c has been renamed to ossl_kdf.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: import v2.1.0.beta1rhe2017-09-0359-1900/+1823
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import Ruby/OpenSSL 2.1.0.beta1. The full commit log since v2.0.5 (imported by r59567) can be found at: https://github.com/ruby/openssl/compare/v2.0.5...v2.1.0.beta1 ---------------------------------------------------------------- Antonio Terceiro (1): test/test_ssl: explicitly accept TLS 1.1 in corresponding test Colby Swandale (1): document using secure protocol to fetch git master in Bundler Colton Jenkins (1): Add fips_mode_get to return fips_mode Kazuki Yamaguchi (85): Start preparing for 2.1.0 Remove support for OpenSSL 0.9.8 and 1.0.0 bn: refine tests bn: implement unary {plus,minus} operators for OpenSSL::BN bn: implement OpenSSL::BN#negative? Don't define main() when built with --enable-debug test: let OpenSSL::TestCase include OpenSSL::TestUtils test: prepare test PKey instances on demand Add OpenSSL.print_mem_leaks Enable OSSL_MDEBUG on CI builds ssl: move default DH parameters from OpenSSL::PKey::DH Make exceptions with the same format regardless of OpenSSL.debug ssl: show reason of 'certificate verify error' in exception message ssl: remove OpenSSL::ExtConfig::TLS_DH_anon_WITH_AES_256_GCM_SHA384 ssl: do not confuse different ex_data index registries ssl: assume SSL/SSL_CTX always have a valid reference to the Ruby object Fix RDoc markup ssl: suppress compiler warning ext/openssl/deprecation.rb: remove broken-apple-openssl extconf.rb: print informative message if OpenSSL can't be found Rakefile: compile the extension before test kdf: introduce OpenSSL::KDF module ossl.h: add NUM2UINT64T() macro kdf: add scrypt Expand rb_define_copy_func() macro Expand FPTR_TO_FD() macro Remove SafeGet*() macros cipher: rename GetCipherPtr() to ossl_evp_get_cipherbyname() digest: rename GetDigestPtr() to ossl_evp_get_digestbyname() Add ossl_str_new(), an exception-safe rb_str_new() bio: simplify ossl_membio2str() using ossl_str_new() Remove unused functions and macros Drop support for LibreSSL 2.3 ocsp: add OpenSSL::OCSP::Request#signed? asn1: infinite length -> indefinite length asn1: rearrange tests ssl: remove a needless NULL check in SSL::SSLContext#ciphers ssl: return nil in SSL::SSLSocket#cipher if session is not started asn1: remove an unnecessary function prototype asn1: require tag information when instantiating generic type asn1: initialize 'unused_bits' attribute of BitString with 0 asn1: check for illegal 'unused_bits' value of BitString asn1: disallow NULL to be passed to asn1time_to_time() asn1: avoid truncating OID in OpenSSL::ASN1::ObjectId#oid asn1: allow constructed encoding with definite length form asn1: prohibit indefinite length form for primitive encoding asn1: allow tag number to be >= 32 for universal tag class asn1: use ossl_asn1_tag() asn1: clean up OpenSSL::ASN1::Constructive#to_der asn1: harmonize OpenSSL::ASN1::*#to_der asn1: prevent EOC octets from being in the middle of the content asn1: do not treat EOC octets as part of content octets x509name: add 'loc' and 'set' kwargs to OpenSSL::X509::Name#add_entry ssl: do not call session_remove_cb during GC Backport "Merge branch 'topic/test-memory-leak'" to maint cipher: update the documentation for Cipher#auth_tag= Rakefile: let sync:to_ruby know about test/openssl/fixtures test: fix formatting test/utils: remove OpenSSL::TestUtils.silent test/utils: add SSLTestCase#tls12_supported? test/utils: have start_server yield only the port number test/utils: do not set ecdh_curves in start_server test/utils: let server_loop close socket test/utils: improve error handling in start_server test/utils: add OpenSSL::TestUtils.openssl? and .libressl? test/utils: do not use DSA certificates in SSL tests test/test_ssl: remove test_invalid_shutdown_by_gc test/test_ssl: move test_multibyte_read_write to test_pair test/test_ssl_session: rearrange tests test/test_pair, test/test_ssl: fix for TLS 1.3 ssl: remove useless call to rb_thread_wait_fd() ssl: fix NPN support ssl: mark OpenSSL::SSL::SSLContext::DEFAULT_{1024,2048} as private ssl: use 2048-bit group in the default tmp_dh_cb ssl: ensure that SSL option flags are non-negative ssl: update OpenSSL::SSL::OP_* flags ssl: prefer TLS_method() over SSLv23_method() ssl: add SSLContext#min_version= and #max_version= ssl: rework SSLContext#ssl_version= test/test_x509name: change script encoding to ASCII-8BIT x509name: refactor OpenSSL::X509::Name#to_s x509name: add OpenSSL::X509::Name#to_utf8 x509name: add OpenSSL::X509::Name#inspect x509name: update regexp in OpenSSL::X509::Name.parse Ruby/OpenSSL 2.1.0.beta1 Marcus Stollsteimer (1): Fix rdoc for core Integer class nobu (4): [DOC] {read,write}_nonblock with exception: false [DOC] keyword argument _exception_ [DOC] mark up literals Revert r57690 except for read_nonblock git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c (fole_initialize): fix typo. thanks to Gray Wolf. suke2017-09-021-4/+4
| | | | | | | [Feature #13828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/coverage/coverage.c: add Coverage.enabled?mame2017-09-011-0/+15
| | | | | | | | * ext/coverage/coverage.c (rb_coverage_running): add to quickly check if coverage is enabled. patched by Burke Libbey <burke AT libbey.me> in [ruby-core:81726]. [Feature #13667] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add Socket::Ifaddr.vhid on supported platforms [Feature #13803]naruse2017-08-312-0/+25
| | | | | | patched by Alan Somers git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c (fole_initialize): support licensed COM server. ↵suke2017-08-261-5/+41
| | | | | | Thanks to Gray Wolf. [Feature :#13828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: fix rb_scan_args_trail_idxnobu2017-08-192-0/+287
| | | | | | | | | | * include/ruby/ruby.h (rb_scan_args_trail_idx): fix the case both of optional and rest arguments are defined. [ruby-core:82427] [Bug #13830] * include/ruby/ruby.h (rb_scan_args_n_trail): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Added gemspec of digest library.hsbt2017-08-161-0/+34
| | | | | | | standalone repository is https://github.com/ruby/digest [Misc #13771][ruby-core:82179] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ripper.rb: fix License format [ci skip]nobu2017-08-151-4/+4
| | | | | | | | * ext/ripper/lib/ripper.rb: [DOC] fix format of the License description and the author. patched by aycabta (Code Ahss) at [ruby-core:82376]. [Bug #13813] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix a class of a returned valueyui-knk2017-08-141-1/+1
| | | | | | | | * ext/objspace/object_tracing.c (allocation_sourceline): Fix a class of a returned value. allocation_sourceline returns an integer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stringio.c: suppress a warning [ci skip]nobu2017-08-131-0/+1
| | | | | | | * ext/stringio/stringio.c (strio_read): suppress an implicit-fallthrough warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stringio.c: encoding at empty chomped resultnobu2017-08-131-9/+9
| | | | | | | * ext/stringio/stringio.c (strio_gets): should return string with the external encoding, at empty chomped result . git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stringio.c: encoding at empty resultnobu2017-08-131-1/+2
| | | | | | | * ext/stringio/stringio.c (strio_gets): should return string with the external encoding, at empty result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stringio.c: encoding at EOFnobu2017-08-121-0/+2
| | | | | | | | * ext/stringio/stringio.c (strio_read): should return string with the external encoding, at EOF too. [ruby-core:82349] [Bug #13806] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e