aboutsummaryrefslogtreecommitdiffstats
path: root/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
* optparse.rb: fix char class optionnobu2016-05-311-0/+8
| | | | | | | | | * lib/optparse.rb (OptionParser::Completion.candidate): get rid of nil as key names. [ruby-core:75773] [Bug #12438] * lib/optparse.rb (OptionParser#make_switch): char class option cannot be NoArgument, default to RequiredArgument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r55225naruse2016-05-311-8/+0
| | | | | | | | | | Run test-all before large commit: "* string.c: Activate full Unicode case mapping for UTF-8 by removing" This reverts commit 3fb0fcd1e881c1f6dd74db73a64e8623208acb77. http://rubyci.s3.amazonaws.com/centos5-64/ruby-trunk/log/20160531T013303Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c: Activate full Unicode case mapping for UTF-8 by removingduerst2016-05-311-0/+8
| | | | | | | | | the protective check for the presence of an option. Update documentation. * test/ruby/enc/test_case_comprehensive.rb: Adjust tests for above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/raddrinfo.c (host_str, port_str): Use StringValueCStrusa2016-05-301-0/+5
| | | | | | | instead of (Safe)StringValue, to detect NUL byte in the string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: use NUM2TIMET() to convert Integer to time_trhe2016-05-301-0/+6
| | | | | | | | * ext/openssl/ossl_asn1.c (time_to_time_t): Use NUM2TIMET() instead of NUM2LONG(). time_t may be larger than long. [ruby-core:45552] [Bug #6571] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c: Document current behavior for other case mapping methodsduerst2016-05-301-0/+5
| | | | | | | on String. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c: Document current situation for String#downcase. [ci skip]duerst2016-05-301-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: add SSLContext#ecdh_curves=rhe2016-05-301-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ext/openssl/ossl_ssl.c (ossl_sslctx_s_alloc): Enable the automatic curve selection for ECDH by calling SSL_CTX_set_ecdh_auto(). With this a TLS server automatically selects a curve which both the client and the server support to use in ECDH. This changes the default behavior but users can still disable ECDH by excluding 'ECDH' cipher suites from the cipher list (with SSLContext#ciphers=). This commit also deprecate #tmp_ecdh_callback=. It was added in Ruby 2.3.0. It wraps SSL_CTX_set_tmp_ecdh_callback() which will be removed in OpenSSL 1.1.0. Its callback receives two values 'is_export' and 'keylength' but both are completely useless for determining a curve to use in ECDH. The automatic curve selection was introduced to replace this. (ossl_sslctx_setup): Deprecate SSLContext#tmp_ecdh_callback=. Emit a warning if this is in use. (ossl_sslctx_set_ecdh_curves): Add SSLContext#ecdh_curves=. Wrap SSL_CTX_set1_curves_list(). If it is not available, this falls back to SSL_CTX_set_tmp_ecdh(). (Init_ossl_ssl): Define SSLContext#ecdh_curves=. * ext/openssl/extconf.rb: Check the existence of EC_curve_nist2nid(), SSL_CTX_set1_curves_list(), SSL_CTX_set_ecdh_auto() and SSL_CTX_set_tmp_ecdh_callback(). * ext/openssl/openssl_missing.[ch]: Implement EC_curve_nist2nid() if missing. * test/openssl/test_pair.rb (test_ecdh_callback): Use EnvUtil.suppress_warning to suppress deprecated warning. (test_ecdh_curves): Test that SSLContext#ecdh_curves= works. * test/openssl/utils.rb (start_server): Use SSLContext#ecdh_curves=. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* raddrinfo.c: fix for SHARABLE_MIDDLE_SUBSTRINGnobu2016-05-301-0/+7
| | | | | | | | | * ext/socket/raddrinfo.c (host_str, port_str): use RSTRING_LEN instead of strlen, since RSTRING_PTR StringValueCStr may not be NUL-terminated when SHARABLE_MIDDLE_SUBSTRING=1. reported by @tmtms, http://twitter.com/tmtms/status/736910516229005312 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: return reallocated pointernobu2016-05-301-0/+5
| | | | | | | * string.c (str_fill_term): return new pointer reallocated by filling terminator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stringio.c: share stringsnobu2016-05-301-0/+5
| | | | | | | * ext/stringio/stringio.c (enc_subseq): share the return value and the buffer as possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: get rid of unnecessary empty stringnobu2016-05-301-0/+7
| | | | | | | | * string.c (str_substr, rb_str_aref): refactor not to create unnecessary empty string. * string.c (str_byte_substr, str_byte_aref): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: fix a typo for r55198.nagachika2016-05-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/-test-/auto_ext.rb: fixed a heedless bug introduced at r55198.usa2016-05-291-0/+5
| | | | | | | this change will make RubyCI green. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regexec.c (ONIGENC_IS_MBC_ASCII_WORD): redefine optimized one.naruse2016-05-291-0/+5
| | | | | | WORD of Ruby's ascii compatible encoding is always [a-zA-Z0-9_]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regexec.c (match_at): make compilers optimize harder.naruse2016-05-291-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* auto_ext.rbnobu2016-05-291-0/+5
| | | | | | | * ext/-test-/auto_ext.rb (auto_ext): utitily method to create extension libraries for tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby-insert-heredoc-code-blocknobu2016-05-281-0/+5
| | | | | | | * misc/ruby-additional.el (ruby-insert-heredoc-code-block): insert here document code block for assert_separately mainly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/test_unicode_normalize.rb: Add test to check for availability ofduerst2016-05-281-0/+6
| | | | | | | | Unicode data file; refactoring; fix an error with tests for destructive method (unicode_normalize!). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_comprehensive.rb: Add error messages to testsduerst2016-05-281-0/+5
| | | | | | | for data file availability; refactoring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: fix typos [ci skip]nobu2016-05-281-3/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: move SSLSocket#initialize to C extensionrhe2016-05-281-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ext/openssl/lib/openssl/ssl.rb (SSLSocket): Move the implementation of SSLSocket#initialize to C. Initialize the SSL (OpenSSL object) in it. Currently this is delayed until ossl_ssl_setup(), which is called from SSLSocket#accept or #connect. Say we call SSLSocket#hostname= with an illegal value. We expect an exception to be raised in #hostname= but actually we get it in the later SSLSocket#connect. Because the SSL is not ready at #hostname=, the actual call of SSL_set_tlsext_host_name() is also delayed. This also fixes: [ruby-dev:49376] [Bug #11724] * ext/openssl/ossl_ssl.c (ossl_ssl_initialize): Added. Almost the same as the Ruby version but this instantiate the SSL object at the same time. (ossl_ssl_setup): Adjust to the changes. Just set the underlying IO to the SSL. (ssl_started): Added. Make use of SSL_get_fd(). This returns -1 if not yet set by SSL_set_fd(). (ossl_ssl_data_get_struct): Removed. Now GetSSL() checks that the SSL exists. (ossl_ssl_set_session): Don't call ossl_ssl_setup() here as now the SSL is already instantiated in #initialize. (ossl_ssl_shutdown, ossl_start_ssl, ossl_ssl_read_internal, ossl_ssl_write_internal, ossl_ssl_stop, ossl_ssl_get_cert, ossl_ssl_get_peer_cert, ossl_ssl_get_peer_cert_chain, ossl_ssl_get_version, ossl_ssl_get_cipher, ossl_ssl_get_state, ossl_ssl_pending, ossl_ssl_session_reused, ossl_ssl_get_verify_result, ossl_ssl_get_client_ca_list, ossl_ssl_npn_protocol, ossl_ssl_alpn_protocol, ossl_ssl_tmp_key): Use GetSSL() instead of ossl_ssl_data_get_struct(). Use ssl_started(). (Init_ossl_ssl): Add method declarations of SSLSocket#{initialize, hostname=}. * ext/openssl/ossl_ssl.h (GetSSL): Check that the SSL is not NULL. It should not be NULL because we now set it in #initialize. * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_initialize): No need to check if the SSL is NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gems/bundled_gems: Update latest releases, power_assert-0.3.0,hsbt2016-05-281-0/+5
| | | | | | test-unit 3.1.9, minitest 5.9.0, did_you_mean 1.0.1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * addr2line.c: drop to support ATARI ST platform. It was discontinuedhsbt2016-05-281-0/+7
| | | | | | | | more than two decades ago. [fix GH-1350] Patch by @cremno * include/ruby/ruby.h: ditto. * io.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_comprehensive.rb: Converted exception forduerst2016-05-281-0/+5
| | | | | | | unavailable Unicode data files to failed assertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/util.rb: added to missing quote.hsbt2016-05-281-0/+5
| | | | | | [fix GH-1363][ci skip] Patch by @dwaller git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typo [ci skip]kazu2016-05-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c: hidden constantsnobu2016-05-271-0/+5
| | | | | | | * variable.c (rb_local_constants_i): exclude hidden constants. [ruby-core:75575] [Bug #12389] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* transcode.c: scrub in the given encodingnobu2016-05-271-0/+6
| | | | | | | | * transcode.c (str_transcode0): scrub in the given encoding when the source encoding is given, not in the encoding of the receiver. [ruby-core:75732] [Bug #12431] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix non-static rb_scan_argsnobu2016-05-271-0/+12
| | | | | | | | | | | | * include/ruby/ruby.h (rb_scan_args): remove nul padding which caused syntax error if fmt is not a string literal. * include/ruby/ruby.h (rb_scan_args_verify): suppress array-bounds warnings by old clang. * include/ruby/ruby.h (rb_scan_args0): make extractor macros inline functions, which do not varidate the format and are unnecessary to be expanded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * symbol.c (is_identchar): use ISDIGIT instead of rb_enc_isalnum.naruse2016-05-261-0/+10
| | | | | | | | | | | Though rb_enc_isalnum is encoding aware function, its argument here is *m, which is a single byte. Therefore ISDIGIT is faster. * symbol.c (is_special_global_name): ditto. * symbol.c (rb_enc_symname_type): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: fix for old clangnobu2016-05-261-0/+8
| | | | | | | | | | | | | | | | * include/ruby/ruby.h (rb_scan_args): add nul padding here to apply to all references. * include/ruby/ruby.h (rb_scan_args_verify): move length mismatch check outside conditional operators. Since old clang cannot optimize away string literal dereference by an immediate index, e.g., ""[0], and both of true and false side expressions are compiled and warned unintentionally. With such old compilers, the check in rb_scan_args() does not work but may result unpredictable value if the format is wrong. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: avoid NULL dereference in {DH,DSA,RSA}_size()rhe2016-05-261-0/+14
| | | | | | | | | | | | | | | | * ext/openssl/ossl_pkey_dh.c (ossl_dh_compute_key): Check that the DH has 'p' (the prime) before calling DH_size(). We can create a DH with no parameter but DH_size() does not check and dereferences NULL. [ruby-core:75720] [Bug #12428] * ext/openssl/ossl_pkey_dsa.c (ossl_dsa_sign): Ditto. DSA_size() does not check dsa->q. * ext/openssl/ossl_pkey_rsa.c (ossl_rsa_public_encrypt, ossl_rsa_public_decrypt, ossl_rsa_private_encrypt, ossl_rsa_private_decrypt): Ditto. RSA_size() does not check rsa->n. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: count and verifynobu2016-05-261-0/+5
| | | | | | | * include/ruby/ruby.h (rb_scan_args_count): verify length with counting variables together. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r55171nobu2016-05-261-5/+0
| | | | | | | | Revert r55171, "ruby.h: fix clang warnings", it did fix array-bounds warnings, but caused string-plus-int warnings instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: fix clang warningsnobu2016-05-261-0/+5
| | | | | | | * include/ruby/ruby.h (rb_scan_args0): use pointer dereference forms instead of array forms, to get rid of warnings by clang. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_comprehensive.rb: Add set of comprehensiveduerst2016-05-261-0/+6
| | | | | | | | (across most Unicode characters; later across most character encodings) tests for case mapping. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_define_class): Fix documentation.eregon2016-05-251-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (unescape_nonascii): scan hex up to only 3 characters.naruse2016-05-251-0/+5
| | | | | | [Bug #12420] [Bug #12423] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/unicode.c: Handle DOTLESS_i by hand because it isn't involved in folding.duerst2016-05-251-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regparse.c (fetch_token_in_cc): raise error if given octal escapednaruse2016-05-251-0/+5
| | | | | | character is too big. [Bug #12420] [Bug #12423] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: drop OpenSSL 0.9.6/0.9.7 supportrhe2016-05-251-0/+4
| | | | | | * ext/openssl, test/openssl: Drop OpenSSL < 0.9.8 support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: remove unnecessary 'extern "C"' blocks from local headersrhe2016-05-251-0/+6
| | | | | | | | * ext/openssl/openssl_missing.h, ext/openssl/ossl.h: Remove unnecessary 'extern "C"' blocks. We don't use C++ and these headers are local to ext/openssl, so there is no need to enclose with it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: remove check of OPENSSL_FIPS macro in extconf.rbrhe2016-05-251-0/+9
| | | | | | | | | | | * ext/openssl/extconf.rb: Remove check of OPENSSL_FIPS macro. This is unneeded because we can check the macro directly in source code, just as we already do for OPENSSL_NO_* macros. * ext/openssl/ossl.c: Replace occurrences of HAVE_OPENSSL_FIPS with OPENSSL_FIPS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* class.c: simplifynobu2016-05-251-0/+4
| | | | | | * class.c (rb_scan_args): merge code for n_trail. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: rb_scan_args_validatenobu2016-05-251-0/+5
| | | | | | | * include/ruby/ruby.h (rb_scan_args_validate): move failed condition to the terminal. [ruby-core:75714] [Bug #12426] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regcomp.c: remove condition for debug output because preludenaruse2016-05-251-0/+5
| | | | | | doesn't use regexp now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regcomp.c (compile_length_tree): return error code immediatelynaruse2016-05-251-0/+5
| | | | | | if compile_length_tree raised error [Bug #12418] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/unicode.c: Fix flag error for switch from titlecase to lowercase.duerst2016-05-241-0/+6
| | | | | | | * test/ruby/enc/test_case_mapping.rb: Tests for above error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: add EC.generaterhe2016-05-241-0/+12
| | | | | | | | | | | | | | * ext/openssl/ossl_pkey_ec.c (ec_key_new_from_group): Create a new EC_KEY on given EC group. Extracted from ossl_ec_key_initialize(). (ossl_ec_key_s_generate): Added. Create a new EC instance and generate a random private and public key. (ossl_ec_key_initialize): Use ec_key_new_from_group(). (Init_ossl_ec): Define the new method EC.generate. This change is for consistency with other PKey types. [ruby-core:45541] [Bug #6567] * test/openssl/test_pkey_ec.rb: Test that EC.generate works. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e