aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ext/openssl: some trivial cleanupsfix/openssl-segv-free-just-fix-itKazuki Yamaguchi2016-04-161-6/+5
| | | | | | | | | | | | | | ossl_start_ssl(): specify the argument type of the function pointer parameter 'func'. ossl_sslctx_set_ciphers(): use StringValueCStr() because SSL_CTX_set_cipher_list() expects NUL-terminated string. ossl_sslctx_setup(): use just RSTRING_PTR() ossl_ssl_shutdown(): remove an unused variable 'rc' and remove a call to SSL_clear(). This function resets the SSL object to allow another connection, but we don't reuse SSL object for another connection.
* ext/openssl: check that the SSL object is still set after reacquiring GVLKazuki Yamaguchi2016-04-162-3/+31
| | | | | | | | | | Fix the segmentation fault due to use after free of SSL object. OpenSSL::SSL::SSLSocket#stop frees the SSL object immediately after SSL_shutdown(), but since some method, such as SSLSocket#connect releases the GVL while waiting the peer, there is a good chance that the SSL object is freed from another thread and this leads to a segmentation fault.
* NEWS: mention [Feature #12245]nobu2016-04-152-1/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io/console: unknown key code for names with nulnobu2016-04-153-2/+28
| | | | | | | | | | * ext/io/console/console.c (console_key_pressed_p): raise the same exception, "unknown virtual key code", for names with nul chars. though console_win32_vk() considers the length and can deal with nul chars, rb_sprintf() raised at PRIsVALUE previously, so quote it if it is unprintable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io/console: move conditionsnobu2016-04-151-4/+7
| | | | | | | * test/io/console/test_io_console.rb: move conditions for method definitions before the bodies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io/console: rb_sym2strnobu2016-04-153-0/+10
| | | | | | | * ext/io/console/console.c (rb_sym2str): fallback definition for older ruby. [ruby-core:74953] [Bug #12284] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io/console: use rb_funcallvnobu2016-04-152-2/+6
| | | | | | | * ext/io/console/console.c: use rb_funcallv instead of rb_funcall2, and define rb_funcallv if unavailable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io/console: fallback RARRAY_CONST_PTRnobu2016-04-151-0/+3
| | | | | | | * ext/io/console/console.c (RARRAY_CONST_PTR): fallback definition for older ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io/console: reject symbols with nul charnobu2016-04-151-4/+3
| | | | | | | * ext/io/console/console.c (console_key_pressed_p): symbol names can contain nul chars, reject them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix commit missnobu2016-04-141-6/+0
| | | | | | * ChangeLog: remove duplicate entry. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-04-15svn2016-04-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add assertions.akr2016-04-141-2/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typo [ci skip]kazu2016-04-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add an assertion.akr2016-04-141-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC]akr2016-04-141-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_sum): Support the optional argument, init, and block.akr2016-04-143-27/+57
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb/ext/save-history.rb: suppress warning: method redefined;naruse2016-04-142-0/+6
| | | | | | discarding old save_history=. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tkutil.c: ary can be nilnobu2016-04-142-1/+7
| | | | | | | | * ext/tk/tkutil/tkutil.c (tk_hash_kv): the third argument can be nil not only an Array. reported by @windwiny at https://github.com/ruby/ruby/commit/cdaa94e#commitcomment-17096618 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: wrong _MSC_VER checknobu2016-04-142-1/+13
| | | | | | | | * cont.c (fiber_initialize_machine_stack_context): fix wrong _MSC_VER check, should be decimal but not hexadecimal. [ruby-core:74936] [Bug #12279] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: prefer rb_check_aritynobu2016-04-141-28/+26
| | | | | | | * process.c: use rb_check_arity instead of rb_scan_args for simple optional arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby-runner.hnobu2016-04-144-7/+8
| | | | | | | * template/ruby-runner.h.in: separate configured part from ruby-runner.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: feature macros on cygwinnobu2016-04-141-0/+1
| | | | | | | * configure.in (cygwin): add feature macros for the declarations of eaccess. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: tabifynobu2016-04-141-6/+6
| | | | | | * configure.in: tabify spaces after a tab. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-04-14svn2016-04-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC]akr2016-04-141-3/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Array#sum described.akr2016-04-131-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a space in [ruby-core:74569] [Feature #12217]akr2016-04-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_sum): Array#sum is implemented.akr2016-04-135-47/+139
| | | | | | | | | | | | | Kahan's compensated summation algorithm for precise sum of float numbers is moved from ary_inject_op in enum.c. * enum.c (ary_inject_op): Don't specialize for float numbers. [ruby-core:74569] [Feature#12217] proposed by mrkn. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: flo_ceilnobu2016-04-133-8/+64
| | | | | | | * numeric.c (flo_ceil): add an optional parameter, digits, as well as Float#round. [Feature #12245] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: flo_floornobu2016-04-133-7/+66
| | | | | | | * numeric.c (flo_floor): add an optional parameter, digits, as well as Integer#floor. [Feature #12245] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: int_ceilnobu2016-04-133-3/+87
| | | | | | | * numeric.c (int_ceil): add an optional parameter, digits, as well as Integer#round. [Feature #12245] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: int_floornobu2016-04-133-1/+85
| | | | | | | * numeric.c (int_floor): add an optional parameter, digits, as well as Integer#round. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS: [Feature #9969]nobu2016-04-131-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: File.empty?nobu2016-04-133-0/+13
| | | | | | | * file.c (Init_File): add alias File.empty? to File.zero?. [Feature #9969] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: massign in condnobu2016-04-135-4/+14
| | | | | | | * parse.y (assign_in_cond): allow multiple assignment in conditional expression. [Feature #10617] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: int_round_zero_pnobu2016-04-134-8/+40
| | | | | | | | | | * bignum.c (rb_big_size): add wrapper function of BIGSIZE and rename the method funtion with _m suffix. * numeric.c (int_round_zero_p): extracted from rb_int_round. optimize for Bignum, and convert VALUE returned by Numeric#size to long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_basicinstructions.rb: add a test to check accessko12016-04-132-0/+31
| | | | | | | | | | | instance variables on special const objects. All of such objects are frozen, so that we can not set instance variables for them. But we can read instance variables and return default value (nil). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-04-13svn2016-04-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: float_invariant_roundnobu2016-04-131-6/+16
| | | | | | | * numeric.c (float_invariant_round): extracted from flo_round to be optimizer-friendly, e.g., tail-call optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: preserve timezonenobu2016-04-123-2/+24
| | | | | | | * ext/date/date_core.c (time_to_time): should preserve timezone info. [ruby-core:74889] [Bug #12271] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* basictest: disable warningsnobu2016-04-121-1/+1
| | | | | | * basictest/runner.rb: disable warnings for old test script. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: initialize LABEL fieldsnobu2016-04-122-0/+7
| | | | | | | * compile.c (new_label_body): initialize bit fields, since compile_data_alloc does not clear the memory. [Bug #12082] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-04-12svn2016-04-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_optimization.rb: disasmnobu2016-04-121-4/+10
| | | | | | | * test/ruby/test_optimization.rb (disasm): dump disassembled code for investigation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos [ci skip]kazu2016-04-111-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update dependencies.akr2016-04-1132-1/+209
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_backtrace.c (frame2klass): filter only for imemo_ment.ko12016-04-112-5/+10
| | | | | | | T_IMEMO/imemo_iseq can be passed here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: disable tco with rescuenobu2016-04-113-2/+75
| | | | | | | | * compile.c (iseq_optimize): disable tail call optimization in rescued, rescue, and ensure blocks. [ruby-core:73871] [Bug #12082] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* TestException.rb: suppress warningnobu2016-04-111-2/+1
| | | | | | | * test/excludes/TestException.rb: suppress "ambiguous first argument" warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: show warning locationsnobu2016-04-111-1/+1
| | | | | | | * test/lib/test/unit.rb (ExcludedMethods.load): supply the path to show the warning locations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e