Граф коммитов

43471 Коммитов

Автор SHA1 Сообщение Дата
rhe d66e88dc2c openssl: report errors in OpenSSL error queue when clear it
* 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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18 04:07:45 +00:00
mrkn 3d42a665d8 Describe Enumerable#sum in NEWS [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18 03:21:53 +00:00
rhe 01801f2afd ext/openssl: refactor OpenSSL::PKey::EC::Point#mul
* 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
2016-05-18 02:55:46 +00:00
rhe b43fd8e080 openssl: fix equality test methods of OpenSSL::BN
* 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
2016-05-18 02:55:45 +00:00
nobu 2bedfc6627 test/win32ole/test_win32ole_variant.rb: use other than Integer
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18 02:05:30 +00:00
nobu 6a69ab937c extension.rdoc: RB_{INTEGER,FLOAT}_TYPE_P [ci skip]
* doc/extension.rdoc, doc/extension.rdoc (Checking Data Types):
  [DOC] mention RB_INTEGER_TYPE_P and RB_FLOAT_TYPE_P.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18 01:21:57 +00:00
nobu 4a9705d6e3 ruby.h: RB_INTEGER_TYPE_P
* 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
2016-05-18 01:17:43 +00:00
nobu abe32a00b1 enum.c: fix declaration-after-statement
* enum.c (sum_iter): workaround of mixed declarations and code.
  erred by -Werror=declaration-after-statement option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18 01:16:50 +00:00
nobu 5d0bf9ae15 extension.rdoc: RB_TYPE_P [ci skip]
* doc/extension.rdoc, doc/extension.rdoc (Checking Data Types):
  [DOC] mention RB_TYPE_P.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18 01:05:36 +00:00
mrkn 49432957c7 Optimize each_sum for hashes
* 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
2016-05-18 00:54:52 +00:00
mrkn eb9c9964b0 Extract int_range_sum from enum_sum
* 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
2016-05-18 00:16:06 +00:00
nobu 7f860741b9 re.c: fix up r55036
* 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
2016-05-17 18:16:08 +00:00
nobu 093c389390 vm_core.h: bit flags
* vm_core.h (rb_vm_struct, rb_thread_struct): make flags bit
  fields.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17 17:24:34 +00:00
naruse e6a10e89b1 * re.c (match_aref): remove useless condition and call rb_fix2int.
rb_reg_nth_match handles negative index.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17 17:10:01 +00:00
naruse 92f8d74a3e * re.c (match_values_at): MatchData#values_at supports named captures
[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
2016-05-17 17:10:01 +00:00
svn 0f621628a9 * 2016-05-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17 15:08:34 +00:00
mrkn d5595a9627 Optimize enum_sum for a range from int to int
* 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
2016-05-17 15:08:33 +00:00
mrkn 41d002bbad Write document of Enumerable#sum
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17 14:09:37 +00:00
mrkn 41ef7ec381 Implement Enumerable#sum
* 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
2016-05-17 13:58:46 +00:00
akr 341b34d733 add issue number for Array#sum incompatitbility description.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17 13:26:24 +00:00
akr 3c7f671a55 Describe Fixnum and Bignum integration in NEWS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17 13:24:53 +00:00
akr 449fbfd4d4 Use Integer instead of Fixnum and Bignum.
* 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
2016-05-17 13:15:57 +00:00
kazu 3118d1e46a fix alignment
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17 12:57:49 +00:00
kazu c1664c7032 fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17 12:57:48 +00:00
svn 918f6490a7 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17 08:25:59 +00:00
akr 1afbc71ac2 forgot to commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17 08:25:58 +00:00
akr f9727c12cc [Feature #12005] Unify Fixnum and Bignum into Integer
* [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
2016-05-17 06:53:48 +00:00
nobu 565241f11f configure.in: declare as NORETURN
* 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
2016-05-17 02:58:40 +00:00
svn 6f7f2e8b81 * 2016-05-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17 01:40:21 +00:00
nobu d077f9c510 configure.in: RUBY_CHECK_SETJMP
* 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
2016-05-17 01:40:20 +00:00
duerst 84cd51919b * enc/unicode.h: Additional uses of ONIG_CASE_MAPPING compilation switch
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-16 11:00:29 +00:00
svn 3ab0ea8027 * append newline at EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-16 10:46:33 +00:00
duerst 65db16de9f * include/ruby/oniguruma.h: Introducing ONIG_CASE_MAPPING compilation
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
2016-05-16 10:46:32 +00:00
hsbt 2f19035306 * gems/bundled_gems: Update xmlrpc-0.1.1. xmlrpc-0.1.0 didn't allow
to install on 2.4.0dev.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-16 10:29:36 +00:00
nobu 9a9d375f73 * test_handle.rb: refine test_fallback_to_ansi
* test/fiddle/test_handle.rb (test_fallback_to_ansi): ensure that
  the fallback result equals to ANSI version.
  [ruby-core:75494] [Bug #12377]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-16 06:26:56 +00:00
nobu c7d11ee1ba configure.in: revert macro names
* 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
2016-05-16 04:29:01 +00:00
hsbt 572807ee99 * lib/xmlrpc: Removed empty directory. It could not be deleted by git-svn.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-16 02:54:07 +00:00
hsbt e2bb529c8f * lib/xmlrpc.rb, lib/xmlrpc/*, test/xmlrpc: XMLRPC is bundled gem
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
2016-05-16 02:41:11 +00:00
nobu b14c93e6ca extmk.rb: fix skipping messages
* ext/extmk.rb (extmake): select the message if skipped because
  its parent extension is not configured.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-16 00:16:13 +00:00
svn 495863fe69 * 2016-05-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-15 21:11:34 +00:00
normal 3044a0bcd9 proc.c: fix RDoc of Proc#===/call/yield/[]
[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
2016-05-15 21:11:33 +00:00
nobu 7803106c1b io.c: use PRI_OFFT_PREFIX for off_t
* io.c (do_io_advise): use configured PRI_OFFT_PREFIX instead of
  PRI_OFF_T_PREFIX to format off_t properly on Cygwin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-15 13:54:57 +00:00
seki e143a74191 don't use keeper thread. [Bug #12342]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-15 11:59:00 +00:00
naruse 6b4132724a * array.c (rb_ary_entry): extract rb_ary_elt to organize if-conditions
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
2016-05-15 07:17:46 +00:00
nobu 9529e46adf random.c: suppress a warning
* random.c (random_ulong_limited): suppress a shift count warning
  when unsigned long is 32bits.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-15 03:03:45 +00:00
nobu 5cb5692ac8 vm_insnhelper.c: deprecated constant in class
* 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
2016-05-15 01:57:28 +00:00
nobu 6d4fb98e59 random.c: clear seed
* random.c (rand_init): clear packed seed value explicitly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-14 23:21:31 +00:00
svn 9be9851623 * 2016-05-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-14 18:43:12 +00:00
naruse 3b4e68cfab * iseq.h (struct iseq_compile_data): use struct rb_id_table
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
2016-05-14 18:43:11 +00:00
nobu 005ee0e455 ChangeLog: GitHub reference
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-14 01:09:00 +00:00