summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-06-02ruby-mode.el: squiggly heredocnobu
* misc/ruby-mode.el (ruby-here-doc-beg-re), (ruby-here-doc-beg-match, ruby-parse-partial): Support for `squiggly heredoc' syntax in ruby-mode. [Fix GH-1372] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-02common.mk: des_tables.cnobu
* common.mk (missing-srcs): add rule for missing/des_tables.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-02crypt.c: suppress warningsnobu
* missing/crypt.c (SPE): make unsigned so that literal integers do not exceed 32bit signed integer limit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-02crypt.c: fix syntax error on mswinnobu
* missing/crypt.c (constdatablock): fix error on mswin. Visual C does not accept an empty initializer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-02* 2016-06-02svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-02ruby.h: reduce repeated calcuationsnobu
* include/ruby/ruby.h (rb_scan_args_{hash,block}_idx): reduce repeated index calcuations. * include/ruby/ruby.h (rb_scan_args_end_idx): unused right now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-02* string.c: Raise ArgumentError when invalid string is detected induerst
case mapping methods. * enc/unicode.c: Check for invalid string and signal with negative length value. * test/ruby/enc/test_case_mapping.rb: Add tests for above. * test/ruby/test_m17n_comb.rb: Add a message to clarify test failure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01ossl_asn1.c: check overflownobu
* ext/openssl/ossl_asn1.c (ossl_time_split): check overflow and reorder for optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01crypt.c: unused functionsnobu
* missing/crypt.c: suppress unused non-reentrant functions, by macro USE_NONREENTRANT_CRYPT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01string.c: fallback to crypt_rnobu
* string.c: prefer crypt_r to crypt iff system crypt nor crypt_r are not provided. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01openssl: fix the Year 2038 problemrhe
r55219 didn't fix the entire issue. It only fixed the issue on environment with sizeof(time_t) == 8 && sizeof(long) == 4. * ext/openssl/extconf.rb: Check existence of ASN1_TIME_adj(). The old ASN1_TIME_set() is not Year 2038 ready on sizeof(time_t) == 4 environment. This function was added in OpenSSL 1.0.0. [ruby-core:45552] [Bug #6571] * ext/openssl/ossl_asn1.c (ossl_time_split): Added. Split the argument (Time) into the number of days elapsed since the epoch and the remainder seconds to conform to ASN1_TIME_adj(). (obj_to_asn1utime, obj_to_asn1gtime): Use ossl_time_split() and ASN1_*TIME_adj(). * ext/openssl/ossl_asn1.h: Add the function prototype for ossl_time_split(). * ext/openssl/ossl_x509.[ch]: Add ossl_x509_time_adjust(). Similarly to obj_to_asn1*time(), use X509_time_adj_ex() instead of X509_time_adj(). * ext/openssl/ossl_x509cert.c, ext/openssl/ossl_x509crl.c, ext/openssl/ossl_x509revoked.c: Use ossl_x509_time_adjust(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01revert r55246nobu
* configure.in: no longer workaround crypt_r by r55247. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01crypt.h: get rid of conflictnobu
* missing/crypt.h: move crypt.h to get rid of conflict with the system header. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01workaround: don't check crypt_rnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01use system cryptnobu
* configure.in: revert r55237. replace crypt, not crypt_r, and check if crypt is broken more. * missing/crypt.c: move crypt_r.c * string.c (rb_str_crypt): use crypt_r if provided by the system. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01des_tables.cnobu
* missing/crypt_r.c: initialize DES tables statically. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01crypt_r.c: fix out of bounds accessnobu
* missing/crypt_r.c (a64toi): initialize statically and fix out of bounds access when salt is not 7bit clean. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01crypt_r.c: DES tablesnobu
* missing/crypt_r.c (des_tables): move sharable DES constant tables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01crypt_r.c: remove castsnobu
* missing/crypt_r.c: consitify and remove unnecessary pointer casts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01common.mk: add dependencynobu
* common.mk (string.o): now depends on crypt.h for crypt_r and struct crypt_data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01* win32/Makefile.sub (MISSING): fixed build error introduced at r55237.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01crypt_r.c: adjust stylenobu
* missing/crypt_r.c: adjust style to BSD as the original. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01use crypt_rnobu
* string.c (rb_str_crypt): use reentrant crypt_r. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01* missing/crypt.c (des_setkey): void function never returns any value.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01separate crypt.hnobu
* crypt.h: separate header file from missing/crypt.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-01add crypt_rnobu
* missing/crypt.c (crypt_r, setkey_r, encrypt_r): add reentrant versions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-31crypt.c: fix size macrosnobu
* missing/crypt.c: fix size macros to use configured values for platforms long is larger than 32bit. [ruby-core:75792] [Bug #12446] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-31crypt.c: protoizenobu
* missing/crypt.c: protoize function definitions and make always-zero functions void. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-31* 2016-06-01svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-31crypt.c: constifynobu
* missing/crypt.c: constify Standard DES Tables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-31openssl: add missing test for r55219rhe
* test/openssl/test_asn1.rb: Add missing regression test for r55219. It fixed the year 2038 issue but the test code was missing. [ruby-core:45552] [Bug #6571] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-31optparse.rb: fix char class optionnobu
* 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
2016-05-31optparse.rb: no duplicate stringsnobu
* lib/optparse.rb (OptionParser#parse_in_order): get rid of making duplicate strings; $1 and others make a new string each times. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-31Revert r55225naruse
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
2016-05-31* string.c: Activate full Unicode case mapping for UTF-8 by removingduerst
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
2016-05-30openssl: fix test failure on Fedora 23rhe
* test/openssl/test_pair.rb (test_ecdh_curves): Avoid P-224. The FIPS patch from RHEL disables it. The curve has to be chosen from: { secp256k1, secp384r1, secp521r1, prime256v1 }. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-30* 2016-05-31svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-30* ext/socket/raddrinfo.c (host_str, port_str): Use StringValueCStrusa
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
2016-05-30test_file_exhaustive.rb: writable opennobu
* test/ruby/test_file_exhaustive.rb (test_flock_shared): open in writable mode for exclusive lock. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-30raddrinfo.c: fix modifiernobu
* ext/socket/raddrinfo.c (host_str, port_str): fix length modifier to size_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-30openssl: use NUM2TIMET() to convert Integer to time_trhe
* 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
2016-05-30* test/socket/test_addrinfo.rb (TestSocketAddrinfo#test_addrinfo_ip): previoususa
test logic depended on platform specific implementation. use more portable logic. this fixes a test failure on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-30* string.c: Document current behavior for other case mapping methodsduerst
on String. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-30test_addrinfo.rb: signle digit addressnobu
* test/socket/test_addrinfo.rb (test_addrinfo_ip): use single digit address so that the values are same in both decimal and octal. some platform zero-prefixed dotted-decimal is parsed as an octal value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-30* string.c: Document current situation for String#downcase. [ci skip]duerst
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-30openssl: add SSLContext#ecdh_curves=rhe
* 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
2016-05-30raddrinfo.c: fix for SHARABLE_MIDDLE_SUBSTRINGnobu
* 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
2016-05-30string.c: return reallocated pointernobu
* 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
2016-05-30test_addrinfo.rb: special hostnamesnobu
* test/socket/test_addrinfo.rb (test_addrinfo_ip): add tests for special hostnames, <any> and <broadcast>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-30stringio.c: share stringsnobu
* 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