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

41614 Коммитов

Автор SHA1 Сообщение Дата
nobu 10bb9e6fab missing.h: explicit_bzero by memset_s
* include/ruby/missing.h (explicit_bzero_by_memset_s): call
  memset_s directly if available.

* missing/explicit_bzero.c: optimization is not a matter if
  memset_s is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-01 01:24:23 +00:00
nobu ff113d52f7 configure.in: FUNC_UNOPTIMIZED
* configure.in: check if optimize pragma is supported.

* include/ruby/defines.h (FUNC_UNOPTIMIZED): fallback definition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-01 01:05:48 +00:00
kosaki 586c174922 * missing/explicit_bzero.c: add a few comment.
* missing/explicit_bzero.c: add disabling optimization on gcc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-01 00:35:59 +00:00
kosaki ed0858a8c5 fix r52806
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-01 00:07:21 +00:00
svn b44b129e12 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 22:53:50 +00:00
normal cae8e96bf5 missing/explicit_bzero.c: Fixup r52806
Maybe kosaki had a better version, but CI failure emails are
annoying.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 22:53:21 +00:00
kosaki 487748fac8 * thread_pthread.c (register_ubf_list): renamed from
add_signal_thread_list.
* thread_pthread.c (unregister_ubf_list): renamed
  from remove_signal_thread_list.
* thread_pthread.c (ubf_wakeup_all_threads): renamed from
  ping_signal_thread_list.
* thread_pthread.c (ubf_wakeup_thread): renamed from
  ubf_select_each.
* thread_pthread.c (ubf_threads_empty): renamed from
  check_signal_thread_list().
* thread_pthread.c (ubf_list_lock): renamed from
  signal_thread_list_lock.

* thread_pthread.c (register_ubf_list): large simplification
  by using ccan/list.h.
  bonus: removed malloc() and exit(EXIT_FAILURE).
* thread_pthread.c (unregister_ubf_list): ditto.
* thread_pthread.c (ubf_threads_empty): ditto.
* thread_pthread.c (ubf_wakeup_all_threads): ditto.

* thread_pthread.c (print_signal_list): removed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 20:33:20 +00:00
kosaki a014e9e8c6 * test/ruby/test_rand.rb (TestRand#test_default_seed): add
srand case.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 20:33:04 +00:00
kosaki 86af9bba63 * random.c (InitVM_Random): move Random::DEFAULT initialization
bits to Init_Random_default.
* random.c (Init_Random_default): renamed from Init_Rndom2.
* random.c (Init_RandomSeedCore): renamed from Init_Random.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 20:32:42 +00:00
kosaki 99c05fb38e * random.c (Init_RandomSeed): move all Random::DEFAULT
construction bits to Init_RandomSeed2. Random::DEFAULT
  and Ruby internal hashes are no longer shared their seed.
* random.c (Init_RandomSeed2): ditto. And, kill evil
  rb_obj_reveal() stuff.
* random.c (init_hashseed): add MT argument.
* random.c: (init_siphash): ditto.
* test/ruby/test_rand.rb (TestRand#test_default_seed): new
  test for Random::DEFAULT::seed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 20:31:31 +00:00
kosaki 052535be3e * random.c (init_hashseed, init_siphash): extract initialize
functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 20:31:11 +00:00
kosaki 0c4e7767ed * configure.in: sort AC_CHECK_HEADERS() by alphabetical order.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 20:30:50 +00:00
kosaki 12e059b18c * random.c (init_randomseed): remove "initial" argument. It never
be used from outside of this function.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 20:29:37 +00:00
kosaki 7104a473ea * lib/securerandom.rb (SecureRandom::gen_random): use /dev/urandom
for initialize OpenSSL's rand.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 20:29:22 +00:00
kosaki 07083767e9 * ext/openssl/ossl_rand.c (ossl_rand_bytes): RAND_bytes could
be return -1 as an error. Therefore, added error handling.
* ext/openssl/ossl_pkey_dsa.c (dsa_generate): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 20:29:02 +00:00
kosaki 86caaefc1f * include/ruby/util.h: remove a warning suppression C4723
(potential divide by zero) for VisualC++. It's meaningless.
  Before r26197, there is ruby_div0() in this place and it
  actually made divide by zero. But now it's just garbage.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 20:27:52 +00:00
kosaki f7bd7d6f1f * random.c: random_raw_seed don't use GRND_NONBLOCK. GRND_NONBLOCK
mean the result might not have an enough cryptic strength and
  easy predictable. That's no good for SecureRandom.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 20:27:11 +00:00
svn 9401002fde * 2015-12-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 20:27:10 +00:00
kosaki dea685c783 * missing/explicit_bzero.c: new file. define explicit_bzero.
* common.mk: add a rule for explicit.o.
* configure.in: detect explicit_bzero and memset_s.
* include/ruby/missing.h: add explicit_bzero.
* random.c (init_randomseed): use explicit_bzero() instead of
  memset(). memset could be eliminated by compiler optimization.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 20:26:13 +00:00
kazu 4eeec4869f fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 13:25:34 +00:00
naruse 6db72c0166 * ext/readline/extconf.rb: call dir_config("libedit")
if --enable-libedit is spcified. [Bug #11751]
  patched by John Hein

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 09:48:24 +00:00
nobu 794fb41099 parse.y: dispatch heredoc end
* parse.y (ripper_dispatch_heredoc_end): at the end of here
  document, the terminator always should present.  has_scan_event
  is true.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 08:11:17 +00:00
nobu 4c6dd77df5 vm_eval.c: make dsym
* vm_eval.c (rb_throw, rb_catch): get rid of making static IDs,
  use dynamic symbos instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 04:44:41 +00:00
nobu 51964bf995 symbol.c: rb_sym_intern
* symbol.c (rb_sym_intern): rename from rb_cstr_intern and add
  variants.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30 04:44:39 +00:00
svn 23ce0a421d * 2015-11-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-29 23:54:25 +00:00
normal 9f9861699b variable.c: remove spurious #define for globals
Removing the indirection helps me with readability, at
least.  It doesn't seem like there are many other places
in the Ruby code where macros are used like this.

[ruby-core:71735] [Feature #11749]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-29 23:53:43 +00:00
naruse 42225163c1 SIGTERM should be also captured
because it will terminate the whole test process when it is
re-raised from this assertion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-29 11:45:59 +00:00
nobu fc0c2d1cc2 version.c: remove ruby_engine_name
* ruby.c (load_file_internal, ruby_process_options): share
  ruby_engine instead of literal strings.

* version.c (Init_version): remove internal `ruby_engine_name`,
  but set the VM program name in addition to the global constant.

* vm_backtrace.c (location_to_str, oldbt_init): use th eVM program
  name always.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-29 02:25:12 +00:00
svn d6beaf3215 * 2015-11-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-29 00:13:25 +00:00
nobu b71f6be026 Corrected grammar errors [ci skip]
* NEWS: [DOC] Various grammar corrections and clarifications to
  increase readability.  [Fix GH-1115]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-29 00:13:05 +00:00
nobu 448d1d147d parse.y: last content of heredoc
* parse.y (parser_here_document): store dispatched result of
  on_tstring_content at the last fragment of a here document.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-28 10:33:58 +00:00
nobu ef44c0ad2f ripper/lexer.rb: dispatch alias
* ext/ripper/lib/ripper/lexer.rb: alias same methods instead of
  eval for each events.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-28 06:56:23 +00:00
nobu cf2b422fc5 ripper/core.rb: share handlers
* ext/ripper/lib/ripper/sexp.rb (SexpBuilderPP): share scanner
  event handlers and most of parser event handlers with
  SexpBuilder.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-28 05:43:17 +00:00
nobu f8ecb823a0 ripper/core.rb: dispatch alias
* ext/ripper/lib/ripper/core.rb: alias same methods instead of
  eval for each events.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-28 05:26:16 +00:00
svn b08bfaf672 * 2015-11-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-27 15:03:45 +00:00
naruse dab944e319 fixup! * lib/net/http.rb (connect): detect closed connection and reconnect If the server closes a keep-alive http connection, the client socket reaches EOF. To avoid an EOFError, detect the closed connection and reconnect. Added test to ensure HTTP#post succeeds even if the keep-alive-connection has been closed by the server. by Kristian Hanekamp <kris.hanekamp@gmail.com> https://github.com/ruby/ruby/pull/1089 fix GH-1089
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-27 15:03:24 +00:00
nobu 36326ceb22 test_parser_events.rb: suppress a warning
* test/ripper/test_parser_events.rb (test_warn_cr_in_middle):
  remove unused variable to suppress assigned-but-unused-variable
  warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-27 14:26:28 +00:00
naruse d249be6233 * lib/net/http.rb (connect): detect closed connection and reconnect
If the server closes a keep-alive http connection, the client socket
  reaches EOF. To avoid an EOFError, detect the closed connection and
  reconnect.
  Added test to ensure HTTP#post succeeds even if the
  keep-alive-connection has been closed by the server.
  by Kristian Hanekamp <kris.hanekamp@gmail.com>
  https://github.com/ruby/ruby/pull/1089 fix GH-1089

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-27 14:07:35 +00:00
nobu 6c0cf1848e parse.y: reduce ifdefs
* parse.y (dispatch_ignored_scan_event, has_delayed_token): more
  macros to reduce ifdefs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-27 02:22:57 +00:00
svn 37e6b8afce * 2015-11-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26 15:41:36 +00:00
naruse 8f0268991c Use more tough server: GitHub or repo.or.cz
https://gcc.gnu.org/wiki/GitMirror

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26 15:40:58 +00:00
naruse 81ece7f0a1 increase additional nfiles
On recent my environment, it must be more than 11.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26 14:13:25 +00:00
nobu 778f32a153 compile.c: tailcall opt for indexers
* compile.c (iseq_peephole_optimize): enable tail call
  optimization for specialized indexers.
* compile.c (iseq_compile_each): blockiseq should be NULL, but not
  Qnil.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26 12:36:43 +00:00
nobu a3ddead991 downloader.rb: Downloader.https
* tool/downloader.rb (Downloader.https): extract a method instead
  of a global variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26 09:09:49 +00:00
svn 4afebfd2c6 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26 08:31:53 +00:00
naruse 9ed1d63f41 * regcomp.c, regenc.c, regexec.c, regint.h, enc/unicode.c:
Merge Onigmo 58fa099ed1a34367de67fb3d06dd48d076839692
  + https://github.com/k-takata/Onigmo/pull/52

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26 08:31:27 +00:00
naruse 360b98355e fixup! r52695
OpenSSL's SHA1 struct name is SHA_CTX (which is also used for SHA-0),
but function name is SHA1_Transform.
http://openssl.org/docs/man0.9.8/crypto/SHA1.html

also note that LibreSSL 2.3 remove the SHA-0 support but still support SHA-1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26 08:31:12 +00:00
hsbt 676c80d203 * test/coverage/test_coverage.rb: Added test-case for Coverage.restart.
[Misc #11732][ruby-dev:49379]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26 00:51:03 +00:00
hsbt a4ac506551 * test/coverage/test_coverage.rb: Added test-case for Coverage.peek_result
without Coverage.start. [Misc #11726][ruby-core:71622]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26 00:48:56 +00:00
svn 717e60c79c * 2015-11-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-25 22:24:05 +00:00