aboutsummaryrefslogtreecommitdiffstats
path: root/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
* openssl: clear OpenSSL error queue before return to Rubytopic/openssl-clear-error-queueKazuki Yamaguchi2016-05-181-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | * ext/openssl/ossl_x509cert.c (ossl_x509_verify): X509_verify() family may put errors on 0 return (0 means verification failure). Clear OpenSSL error queue before return to Ruby. Since the queue is thread global, remaining errors in the queue can cause an unexpected error in the next OpenSSL operation. [ruby-core:48284] [Bug #7215] * ext/openssl/ossl_x509crl.c (ossl_x509crl_verify): ditto. * ext/openssl/ossl_x509req.c (ossl_x509req_verify): ditto. * ext/openssl/ossl_x509store.c (ossl_x509stctx_verify): ditto. * ext/openssl/ossl_pkey_dh.c (dh_generate): clear the OpenSSL error queue before re-raising exception. * ext/openssl/ossl_pkey_dsa.c (dsa_generate): ditto. * ext/openssl/ossl_pkey_rsa.c (rsa_generate): ditto. * ext/openssl/ossl_ssl.c (ossl_start_ssl): ditto. * test/openssl: check that OpenSSL.errors is empty every time after running a test case.
* openssl: report errors in OpenSSL error queue when clear itKazuki Yamaguchi2016-05-181-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | * ext/openssl/ossl.c (ossl_clear_error): Extracted from ossl_make_error(). This prints errors in the OpenSSL error queue if OpenSSL.debug is true, and clears the queue. (ossl_make_error): use ossl_clear_error(). * ext/openssl/ossl.h: add prototype declaration of ossl_make_error(). (OSSL_BIO_reset) use ossl_clear_error() to clear the queue. Clearing silently makes debugging difficult. * ext/openssl/ossl_engine.c (ossl_engine_s_by_id): ditto. * ext/openssl/ossl_ns_spki.c (ossl_spki_initialize): ditto. * ext/openssl/ossl_pkcs7.c (ossl_pkcs7_verify): ditto. * ext/openssl/ossl_pkey_dsa.c (ossl_dsa_initialize): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_initialize): ditto. (ossl_ec_group_initialize): ditto. * ext/openssl/ossl_ssl.c (ossl_ssl_shutdown): ditto.
* ext/openssl: refactor OpenSSL::PKey::EC::Point#mulrhe2016-05-181-0/+9
| | | | | | | | | | | * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_mul): Validate the arguments before passing to EC_POINT(s)_mul(). Add description of this method. [ruby-core:65152] [Bug #10268] * test/openssl/test_pkey_ec.rb (test_ec_point_mul): Test that OpenSSL::PKey::EC::Point#mul works. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: fix equality test methods of OpenSSL::BNrhe2016-05-181-0/+14
| | | | | | | | | | | | | | | | * ext/openssl/ossl_bn.c (try_convert_to_bnptr): Extracted from GetBNPtr(). This doesn't raise exception but returns NULL on error. (GetBNPtr): Raise TypeError if conversion fails. (ossl_bn_eq): Implement BN#==. (ossl_bn_eql): #eql? should not raise TypeError even if the argument is not compatible with BN. (ossl_bn_hash): Implement BN#hash. * ext/openssl/ossl_bn.c (Init_ossl_bn): Define #== and #hash. * test/openssl/test_bn.rb: Test BN#eql?, #== and #hash git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: RB_INTEGER_TYPE_Pnobu2016-05-181-0/+6
| | | | | | | | * include/ruby/ruby.h (RB_INTEGER_TYPE_P): new macro and underlying inline function to check if the object is an Integer (Fixnum or Bignum). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Optimize each_sum for hashesmrkn2016-05-181-0/+5
| | | | | | | * enum.c (enum_sum, hash_sum, hash_sum_i, enum_sum_i, sum_iter): Optimize for hashes when each method isn't redefined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Extract int_range_sum from enum_summrkn2016-05-181-1/+6
| | | | | | | * enum.c (enum_sum, int_range_sum): Extract int_range_sum from enum_sum. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* re.c: fix up r55036nobu2016-05-171-0/+5
| | | | | | | * re.c (match_values_at): fix regression at r55036. MatchData#values_at accepts Range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (match_aref): remove useless condition and call rb_fix2int.naruse2016-05-171-0/+5
| | | | | | rb_reg_nth_match handles negative index. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (match_values_at): MatchData#values_at supports named capturesnaruse2016-05-171-0/+7
| | | | | | | | [Feature #9179] * re.c (namev_to_backref_number): separeted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Optimize enum_sum for a range from int to intmrkn2016-05-171-0/+11
| | | | | | | | | | | | | * enum.c (enum_sum): Optimize for a range from int to int. * test/ruby/test_enum.rb (test_range_sum): Move from test_range.rb, and add assertions for some conditions. * test/ruby/test_enum.rb (test_hash_sum): Move from test_hash.rb. * test/ruby/test_hash.rb, test/ruby/test_range.rb: Remove test_sum. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Write document of Enumerable#summrkn2016-05-171-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Implement Enumerable#summrkn2016-05-171-0/+10
| | | | | | | | | | | | * enum.c (enum_sum): Implement Enumerable#sum. * test/ruby/test_enum.rb (test_sum): Test sum for Enumerable. * test/ruby/test_hash.rb (test_sum): Test sum for Hash. * test/ruby/test_range.rb (test_sum): Test sum for Range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use Integer instead of Fixnum and Bignum.akr2016-05-171-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | * object.c, numeric.c, enum.c, ext/-test-/bignum/mul.c, lib/rexml/quickpath.rb, lib/rexml/text.rb, lib/rexml/xpath_parser.rb, lib/rubygems/specification.rb, lib/uri/generic.rb, bootstraptest/test_eval.rb, basictest/test.rb, test/-ext-/bignum/test_big2str.rb, test/-ext-/bignum/test_div.rb, test/-ext-/bignum/test_mul.rb, test/-ext-/bignum/test_str2big.rb, test/csv/test_data_converters.rb, test/date/test_date.rb, test/json/test_json_generate.rb, test/minitest/test_minitest_mock.rb, test/openssl/test_cipher.rb, test/rexml/test_jaxen.rb, test/ruby/test_array.rb, test/ruby/test_basicinstructions.rb, test/ruby/test_bignum.rb, test/ruby/test_case.rb, test/ruby/test_class.rb, test/ruby/test_complex.rb, test/ruby/test_enum.rb, test/ruby/test_eval.rb, test/ruby/test_iseq.rb, test/ruby/test_literal.rb, test/ruby/test_math.rb, test/ruby/test_module.rb, test/ruby/test_numeric.rb, test/ruby/test_range.rb, test/ruby/test_rational.rb, test/ruby/test_refinement.rb, test/ruby/test_rubyvm.rb, test/ruby/test_struct.rb, test/ruby/test_variable.rb, test/rubygems/test_gem_specification.rb, test/thread/test_queue.rb: Use Integer instead of Fixnum and Bignum. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos [ci skip]kazu2016-05-171-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [Feature #12005] Unify Fixnum and Bignum into Integerakr2016-05-171-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [Feature #12005] Unify Fixnum and Bignum into Integer * include/ruby/ruby.h (rb_class_of): Return rb_cInteger for fixnums. * insns.def (INTEGER_REDEFINED_OP_FLAG): Unified from FIXNUM_REDEFINED_OP_FLAG and BIGNUM_REDEFINED_OP_FLAG. * vm_core.h: Ditto. * vm_insnhelper.c (opt_eq_func): Use INTEGER_REDEFINED_OP_FLAG instead of FIXNUM_REDEFINED_OP_FLAG. * vm.c (vm_redefinition_check_flag): Use rb_cInteger instead of rb_cFixnum and rb_cBignum. (C): Use Integer instead of Fixnum and Bignum. * numeric.c (fix_succ): Removed. (Init_Numeric): Define Fixnum as Integer. * bignum.c (bignew): Use rb_cInteger instead of Rb_cBignum. (rb_int_coerce): replaced from rb_big_coerce and return fixnums as-is. (Init_Bignum): Define Bignum as Integer. Don't define ===. * error.c (builtin_class_name): Return "Integer" for fixnums. * sprintf.c (ruby__sfvextra): Use rb_cInteger instead of rb_cFixnum. * ext/-test-/testutil: New directory to test. Currently it provides utilities for fixnum and bignum. * ext/json/generator/generator.c: Define mInteger_to_json. * lib/mathn.rb (Fixnum#/): Redefinition removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: declare as NORETURNnobu2016-05-171-0/+6
| | | | | | | | * configure.in (RUBY_CHECK_BUILTIN_SETJMP): declare t as NORETURN to suppress warnings by -Wsuggest-attribute=noreturn. [ruby-core:75510] [Bug #12383] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: RUBY_CHECK_SETJMPnobu2016-05-171-0/+5
| | | | | | | * configure.in (RUBY_CHECK_SETJMP): needs the header and proper arguments for builtin setjmp functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/unicode.h: Additional uses of ONIG_CASE_MAPPING compilation switchduerst2016-05-161-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h: Introducing ONIG_CASE_MAPPING compilationduerst2016-05-161-0/+8
| | | | | | | | | switch * include/ruby/oniguruma.h, enc/unicode.h: Using ONIG_CASE_MAPPING compilation switch git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gems/bundled_gems: Update xmlrpc-0.1.1. xmlrpc-0.1.0 didn't allowhsbt2016-05-161-0/+5
| | | | | | to install on 2.4.0dev. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: revert macro namesnobu2016-05-161-0/+8
| | | | | | | | | | * configure.in (FUNC_STDCALL, FUNC_CDECL, FUNC_FASTCALL): set macro names explicitly to the old names, which are accidentally changed at r54985, for backward compatibilities. fiddle also depends on these names to fallback to ANSI names. [ruby-core:75494] [Bug #12377] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/xmlrpc.rb, lib/xmlrpc/*, test/xmlrpc: XMLRPC is bundled gemhsbt2016-05-161-0/+7
| | | | | | | on Ruby 2.4. [Feature #12160][ruby-core:74239] * gems/bundled_gems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: fix RDoc of Proc#===/call/yield/[]normal2016-05-151-0/+5
| | | | | | | | | | | | | | | | | [Bug #12332] Since r52050 ("proc.c: enable optimization of Proc#call") for [Feature #11569], we need to maintain this documentation in a way RDoc comprehends. This is probably not worth fixing in RDoc itself since this uses a non-standard internal C API which is subject to change without notice. ref: http://mid.gmane.org/20160429212836.GA16605@dcvr.yhbt.net http://mid.gmane.org/1461959651.806728.670.51764@mail.rambler.ru http://blade.nagaokaut.ac.jp/ruby/ruby-talk/435458 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* don't use keeper thread. [Bug #12342]seki2016-05-151-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_entry): extract rb_ary_elt to organize if-conditionsnaruse2016-05-151-0/+5
| | | | | | and check whether is is embdeded at once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_insnhelper.c: deprecated constant in classnobu2016-05-151-0/+5
| | | | | | | * vm_insnhelper.c (vm_get_ev_const): warn deprecated constant even in the class context. [ruby-core:75505] [Bug #12382] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.h (struct iseq_compile_data): use struct rb_id_tablenaruse2016-05-141-0/+14
| | | | | | | | | | | | | | | instead of st_table. * iseq.c (prepare_iseq_build): don't allocate ivar_cache_table until it has at least one element. * iseq.c (compile_data_free): free ivar_cache_table only if it is allocated. * compile.c (get_ivar_ic_value): allocate if the table is not allocated yet. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: GitHub referencenobu2016-05-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/mkmf.rb: use xsystem to pkg-config --existsnobu2016-05-141-0/+6
| | | | | | | | * lib/mkmf.rb (pkg_config): use xsystem consistently to set up library path environment variable as well as latter pkg-config calls. [ruby-dev:49619] [Bug #12379] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c: no local copy of the seednobu2016-05-131-0/+5
| | | | | | | * random.c (make_seed_value): append leading-zero-guard and get rid of making a local copy of the seed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos [ci skip]kazu2016-05-131-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* drop FreeBSD < 4 supportnobu2016-05-121-0/+8
| | | | | | | | | | * NEWS: drop FreeBSD < 4 support. The most recent version affected by this is 3.5 and was released in 2000. https://www.freebsd.org/releases/3.5R/announce.html https://en.wikipedia.org/wiki/History_of_FreeBSD#Version_history git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/defines.h (GCC_VERSION_SINCE): moved from internal.hnaruse2016-05-121-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use HAVE_BUILTIN___BUILTIN_CONSTANT_Pnaruse2016-05-121-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configurein: use alternative keywordnaruse2016-05-121-0/+5
| | | | | | to avoid macros conflicts with them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typo [ci skip]kazu2016-05-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mkmf.rb: fix conflict in have_librarynobu2016-05-111-0/+5
| | | | | | | * lib/mkmf.rb (try_func): get rid of conflict of declarations of main(). checking local symbol reference does not make sense. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/Makefile.sub (HAVE_QSORT_S): use qsort_s only for Visual Studiousa2016-05-111-0/+6
| | | | | | | | 2012 or later, because VS2010 seems to causes a SEGV in test/ruby/test_enum.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typo at ChangeLogtarui2016-05-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_getivar): describe fast-path explicittarui2016-05-111-0/+5
| | | | | | | (compiler frindly). [Bug #12274]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): share InlineCache during sametarui2016-05-111-0/+13
| | | | | | | | | | | | | | | instance variable accesses. Reducing memory consumption, rasing cache hit rate and rasing branch prediction hit rate are expected. A part of [Bug #12274]. * iseq.h (struct iseq_compile_data): introduce instance variable IC table for sharing. * iseq.c (prepare_iseq_build, compile_data_free): construct/destruct above table. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* util.c: qsort_snobu2016-05-111-0/+5
| | | | | | | * util.c (ruby_qsort): use qsort_s if available, for Microsoft Visual Studio 2005 (msvcr80.dll) and mingw. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix file name [ci skip]nobu2016-05-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: Remove trailing-whitespaces.hsbt2016-05-111-0/+5
| | | | | | [ci skip][fix GH-1348] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def (defineclass): Also raise an error when redeclaring theeregon2016-05-101-0/+8
| | | | | | | | superclass of a class as Object and it has another superclass. [Bug #12367] [ruby-core:75446] * test/ruby/test_class.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c: use bytesnobu2016-05-101-0/+5
| | | | | | | * random.c (obj_random_bytes): base on bytes method instead of rand method, not to call toplevel rand method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (-fexcess-precision=standard): before r54895 -std=c99naruse2016-05-101-0/+7
| | | | | | | | is specified and it implied -fexcess-precision=standard. Now with -std=gnu99, it should be explicitly specified. https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typo [ci skip]kazu2016-05-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: GET_THREAD once in rb_thread_atforknobu2016-05-091-0/+6
| | | | | | | * thread.c (rb_thread_atfork_internal): move th to an argument. * thread.c (rb_thread_atfork): do not repeat GET_THREAD(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e