summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-05-22move duplicate assertionsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21just check Integernobu
* test/ruby/test_bignum.rb (test_pow): just assert to be an Integer. * test/ruby/test_integer_comb.rb (check_class): ditto. * test/ruby/test_numeric.rb (test_coerce): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21hash method valuesnobu
* test/ruby/test_{complex,range,rational,struct}.rb (test_hash): hash values should be an Integer, not only a Fixnum. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21* 2016-05-22svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21* ext/zlib/zlib.c: remove hacky macro introduced at r30437.naruse
* ext/zlib/zlib.c (gzfile_make_header): cast as long (instead of int). * ext/zlib/zlib.c (gzfile_make_footer): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21Revert r50102naruse
This reverts "* include/ruby/ruby.h (rb_scan_args): don't use ALWAYS_INLINE with" This rb_scan_args macro is GCCism. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21* include/ruby/ruby.h (rb_scan_args): don't use ALWAYS_INLINE withusa
`inline`. if gcc needs this duplication, do in ALWAYS_INLINE macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21* include/ruby/ruby.h (rb_scan_args): use __VA_ARGS__ instead ofnaruse
va_arg to allow compilers optimize more aggressive. https://gustedt.wordpress.com/2011/07/10/avoid-writing-va_arg-functions/ rb_scan_args is now expected to be statically resolved. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21* configure.in (ALWAYS_INLINE): force compilers the function inlined.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21openssl: fix possible SEGV on race between SSLSocket#stop and #connectrhe
* ext/openssl/ossl_ssl.c (ossl_ssl_stop): Don't free the SSL struct here. Since some methods such as SSLSocket#connect releases GVL, there is a chance of use after free if we free the SSL from another thread. SSLSocket#stop was documented as "prepares it for another connection" so this is a slightly incompatible change. However when this sentence was added (r30090, Add toplevel documentation for OpenSSL, 2010-12-06), it didn't actually. The current behavior is from r40304 (Correct shutdown behavior w.r.t GC., 2013-04-15). [ruby-core:74978] [Bug #12292] * ext/openssl/lib/openssl/ssl.rb (sysclose): Update doc. * test/openssl/test_ssl.rb: Test this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21openssl: fix SSL client example in documentation [ci skip]rhe
* ext/openssl/ossl.c: [DOC] Fix SSL client example. The variable name was wrong. Patch by Andreas Tiefenthaler <at@an-ti.eu> (@pxlpnk). [GH ruby/openssl#32] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21openssl: add OpenSSL::PKey::EC#private? and #public?rhe
* ext/openssl/ossl_pkey_ec.c: rename PKey::EC#private_key? and #public_key? to #private? and #public? for consistency with other PKey types. Old names remain as alias. [ruby-core:45541] [Bug #6567] * test/openssl/test_pkey_ec.rb (test_check_key): check private? and public? works correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21openssl: remove impossible EOFError raise in OpenSSL::Bufferingrhe
* ext/openssl/lib/openssl/buffering.rb (read_nonblock, readpartial): Remove impossible EOFError raise. Patch by Zach Anker <zanker@squareup.com>. [GH ruby/openssl#23] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21ipaddr: fix typo [ci skip]nobu
* lib/ipaddr.rb: [DOC] fix documentation of IN6MASK to mention IPv6. [Fix GH-1349] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21Restore documentation of ARGFnobu
* io.c (Init_IO): [DOC] define dummy ARGF instead of ARGF.class to re-enable the generation of ARGF documentation. [Fix GH-1358] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21methods.rdoc: closing tagnobu
* doc/syntax/methods.rdoc (Method Names): add proper closing tag. [Fix GH-1356] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-21configure.in: missing macro definitionnobu
* configure.in (RUBY_CHECK_SETJMP): fix missing macro definition for the configured result. fix up r55021. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20fix build on no-fork-spawnv platformsnobu
* process.c (rb_execarg_commandline): build command line string from argument vector in rb_execarg. [ruby-core:75611] [Bug #12398] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20io.c: conditionally used functionsnobu
* io.c (pipe_atexit): only used on Windows * io.c (rb_execarg_fixup_v): wrapper only used fork or spawnv is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20ossl.c: suppress warningsnobu
* ext/openssl/ossl.c (ossl_pem_passwd_cb): check integer precision. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20* 2016-05-21svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20openssl: improve handling of password for encrypted PEMrhe
* ext/openssl/ossl.c (ossl_pem_passwd_value): Added. Convert the argument to String with StringValue() and validate the length is in 4..PEM_BUFSIZE. PEM_BUFSIZE is a macro defined in OpenSSL headers. (ossl_pem_passwd_cb): When reading/writing encrypted PEM format, we used to pass the password to PEM_def_callback() directly but it was problematic. It is not NUL character safe. And surprisingly, it silently truncates the password to 1024 bytes. [GH ruby/openssl#51] * ext/openssl/ossl.h: Add function prototype declaration of newly added ossl_pem_passwd_value(). * ext/openssl/ossl_pkey.c (ossl_pkey_new_from_data): Use ossl_pem_passwd_value() to validate the password String. * ext/openssl/ossl_pkey_dsa.c (ossl_dsa_initialize, ossl_dsa_export): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_initialize, ossl_ec_key_to_string): ditto. * ext/openssl/ossl_pkey_rsa.c (ossl_rsa_initialize, ossl_rsa_export): ditto. * test/openssl/test_pkey_{dsa,ec,rsa}.rb: test this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20capa should be even number on 64-bit SPARC for 8-byte word alignmentngoto
* id_table.c (list_id_table_init): When unaligned word access is prohibited and sizeof(VALUE) is 8 (64-bit machines), capa should always be even number for 8-byte word alignment of the values of a table. This code assumes that sizeof(ID) is 4, sizeof(VALUE) is 8, and xmalloc() returns 8-byte aligned memory. This fixes bus error on 64-bit SPARC Solaris 10. [Bug #12406][ruby-dev:49631] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20thread_pthread.c: no fork, no gvl_atforknobu
* thread_pthread.c (gvl_atfork): used in rb_thread_atfork_internal only if HAVE_WORKING_FORK is defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20Use HAVE_BUILTIN___BUILTIN_CONSTANT_Pngoto
* symbol.h (rb_id2sym): Use HAVE_BUILTIN___BUILTIN_CONSTANT_P git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20fix typos [ci skip]kazu
* ext/date/date_core.c: [DOC] fix typos. [fix GH-1360] patched by @soundasleep git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20Use RB_GNUC_EXTENSION_BLOCK instead of __extension__ngoto
* include/ruby/defines.h (RB_GNUC_EXTENSION, RB_GNUC_EXTENSION_BLOCK): macros for skipping __extension__ on non-GCC compilers. * eval_error.c (warn_print): use RB_GNUC_EXTENSION_BLOCK instead of __extension__ because __extension__ is a GNU extension. Fix compile error on Solaris 10 with Oracle Solaris Studio 12.x. [Bug #12397] [ruby-dev:49629]. * internal.h (rb_fstring_cstr, rb_fstring_enc_cstr): ditto * include/ruby/encoding.h (rb_enc_str_new, rb_enc_str_new_cstr): ditto * include/ruby/intern.h (rb_str_new, rb_str_new_cstr, rb_usascii_str_new, rb_utf8_str_new, rb_tainted_str_new_cstr, rb_usascii_str_new_cstr, rb_utf8_str_new_cstr, rb_external_str_new_cstr, rb_locale_str_new_cstr, rb_str_buf_new_cstr, rb_str_cat_cstr, rb_exc_new_cstr): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20win32ole.c: share the contentnobu
* ext/win32ole/win32ole.c (fole_missing): make substring or dup to share the content if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20win32ole.c: remove dead codenobu
* ext/win32ole/win32ole.c (fole_missing): remove dead code meaningless since r51913. RSTRING_LEN does not exceed LONG_MAX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20exclude non-VALUE in memo from GCnobu
* internal.h (NEW_PARTIAL_MEMO_FOR): shrink buffer array not to mark non-VALUE fields. fix check_rvalue_consistency abort with RGENGC_CHECK_MODE=2. * internal.h (NEW_CMP_OPT_MEMO): exclude struct cmp_opt_data from the valid array range. * enum.c (slicewhen_i): exclude inverted too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20openssl: don't test default session lifetime valuerhe
OpenSSL's default session timeout for TLS v1.0 method is not 300 seconds but 7200. The TLS v1.0 specification[1] mentions about it as just "An upper limit of 24 hours is suggested for session ID lifetimes,". And according to OpenSSL 1.0.2h source comment[2], the value 7200 is decided just because "the 24 hours mentioned in the TLSv1 spec is way too long for http, the cache would over fill". The reason why the default lifetime is set to 300 is maybe an OpenSSL bug. We always call SSL_CTX_new() with SSLv23_method(), and this set ssl_ctx->session to 300, the default value for SSLv23_method(). But the following SSL_set_ssl_method() call does not update it. By the way this will be fixed in OpenSSL 1.1.0. [1] https://tools.ietf.org/html/rfc2246#appendix-F.1.4 [2] https://git.openssl.org/?p=openssl.git;a=blob;f=ssl/t1_lib.c;h=dd5bd0050d89f5585c1b06a227eb8221ebf984f1;hb=5dd94f1847c744929a3bd24819f1c99644bb18c7#l193 * test/openssl/test_ssl_session.rb (test_session): remove assertion of the default session timeout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-19* 2016-05-20svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-19fix a typosorah
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-19fix document of Regexp#match?kazu
* re.c (rb_reg_match_m_p): [DOC] fix return value in rdoc. * test/ruby/test_regexp.rb (TestRegexp#test_match_p): add some tests from document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-19openssl: register ex_data index for X509_STORE{_CTX,} respectivelyrhe
* ext/openssl/ossl.c (Init_openssl): register an ex_data index for X509_STORE and X509_STORE_CTX respectively. Since they don't share the ex_data index registry, we can't use the same index. (ossl_verify_cb): use the the correct index. * ext/openssl/ossl_ssl.c (ossl_ssl_verify_callback): ditto. * ext/openssl/ossl_x509store.c (ossl_x509store_set_vfy_cb): ditto. (ossl_x509stctx_verify): ditto. * ext/openssl/ossl.h (void ossl_clear_error): add extern declarations of ossl_store_{ctx_,}ex_verify_cb_idx. * ext/openssl/openssl_missing.c: remove X509_STORE_set_ex_data and X509_STORE_get_ex_data. * ext/openssl/openssl_missing.h: implement X509_STORE_get_ex_data, X509_STORE_set_ex_data and X509_STORE_get_ex_new_index as macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-19* test/ruby/test_array.rb (TestArray#test_push_over_ary_max): it seems to takeusa
long time on mswinci. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-19* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-19openssl: check argument type in OpenSSL::X509::Attribute#value=rhe
* ext/openssl/ossl_x509attr.c (ossl_x509attr_set_value): check that the argument is an OpenSSL::ASN1::Data before converting to ASN1_TYPE. This fixes SEGV on OpenSSL::X509::Attribute#value=(non-asn1-value). * test/openssl/test_x509attr.rb: add tests for OpenSSL::X509::Attribute. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-19assertions.rb: leave timeout to invoke_rubynobu
* test/lib/test/unit/assertions.rb (assert_separately): leave timeout to invoke_ruby, which handles outputs and status of the target process since r51539. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-19re.c: fix match?nobu
* re.c (rb_reg_match_m_p): fix match against empty string. rb_str_offset returns the end when the position exceeds the length. fix the range parameter of onig_search. [ruby-core:75604] [Bug #12394] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-19fix typonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-19re.c: match? should return nil if no matchnobu
* re.c (rb_reg_match_m_p): should return nil if no match, as the document says. [Feature #8110] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18* 2016-05-19svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18* re.c (reg_names_iter): specify capacifynaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18* thread.c (recursive_list_access): a object id may be a Bignum. so,usa
the list must be a objhash, instead of a identhash. this fixes many test errors on mswin64 CI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18re.c: fix typenobu
* re.c (rb_reg_match_m_p): fix type of variable for onig_search result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18* re.c (rb_reg_match_m_p): Introduce Regexp#match?, which returnsnaruse
bool and doesn't save backref. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18openssl: fix test failure due to the previous commitrhe
* test/openssl/test_pkey_ec.rb (test_ec_point_mul): My previous commit r55059 was broken. I should have been more careful. Sorry. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18openssl: fix test failure of OpenSSL::TestEC#test_ec_point_mulrhe
* test/openssl/test_pkey_ec.rb (test_ec_point_mul): CentOS 7 patches OpenSSL to reject curves defined over a small field. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e