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

46595 Коммитов

Автор SHA1 Сообщение Дата
ko1 a9b001a4eb skip openssl related tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 04:23:10 +00:00
svn 1fc689d978 * 2017-05-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 00:15:55 +00:00
nobu 6ec37b8f75 enable ruby_w32_codepage on cygwin
* debug.c, localeinit.c: enable ruby_w32_codepage on cygwin too.
  [ruby-core:81163] [Bug #13567]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 00:15:54 +00:00
ko1 f033cfa381 refresh Gem at the end of `teardown`.
* lib/rubygems/test_case.rb (teardown): call `Gem::refresh()` at the
  end of `teardown`.
  On parallel test sometimes fails test process. The reason
  is:
  (1) previous tests remains `Gem::Specification@@stubs` value
      which points to temporary directories and the directories
      are removed by `teardown` method of previous test.
  (2) `require 'rubygems/gem_runner'` in `test_gem_gem_runner.rb`
      tries to require test utility file. However, with strange `@@stubs`
      RubyGems tries to load specification from removed directory.
      `StubSpecification#to_spec` returns `nil` and error will occur.
  The solution this patch employs is to refresh all of parameters
  includes `Gem::Specification@@stubs` by `Gem::refresh()`.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 14:40:07 +00:00
k0kubun 52c738408e erb.rb: Use String#<< instead of #concat
to optimize String concatenation on rendering.

[fix GH-1612]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 13:38:02 +00:00
sorah efd36678e6 [DOC] File#path result can be inaccurate
* file.c(rb_file_path): [DOC] Note that the pathname returned by this
  method can be inaccurate, for instance file gets moved, renamed,
  deleted or is created with File::TMPFILE option.

  Relates to [Feature #13568]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 12:18:55 +00:00
nobu bb03a2db5c optional/capi: use LIBRUBYARG_SHARED
* spec/rubyspec/optional/capi/spec_helper.rb (compile_extension):
  use LIBRUBYARG_SHARED for LDSHARED.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 11:32:35 +00:00
nobu dc65024475 thread_spec.c: use rb_w32_pipe
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 11:25:56 +00:00
nobu 604e552525 io_spec.c: suppress unused-variable warning
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 11:19:12 +00:00
nobu b4939106f3 configure.in: negative time_t for mingw
* configure.in: mingw also uses MSVCRT accepts negative time_t.
  c.f. r58681.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 11:16:27 +00:00
nobu 062f5eb813 configure.in: remove dynamic option in LDSHARED
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 11:16:26 +00:00
nobu c68b4c5f58 optional/capi: fix link on mingw
* spec/rubyspec/optional/capi/spec_helper.rb (compile_extension):
  LIBRUBYARG is always necessary unless dynamic lookup is allowed.
  strip $(DEFFILE) from DLDFLAGS on mingw.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 11:16:25 +00:00
nobu 912fc58353 default.mspec: ignore unavailable FDs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 10:32:30 +00:00
usa a852853f44 Should call `ln_s` only when symlink is available
* test/fileutils/test_fileutils.rb (test_ln_s): skip if symlink is not
  available.

* test/fileutils/test_fileutils.rb (test_ln_s): remove created symlink
  certainly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 07:35:26 +00:00
normal fba0b81e18 test/socket/test_basicsocket.rb (socks): bind explicitly to localhost
Binding to a potentially public IP in a test can cause problems
if hit by a random port scanner or something...

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 07:33:10 +00:00
nobu 0f4d856d4d define RUBY_DEBUG_ENV only for main.c
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 07:04:48 +00:00
ko1 895954ef91 add information for debugging.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 07:02:33 +00:00
svn 51c2feee77 * 2017-05-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 06:17:30 +00:00
nobu 39c73ae2a6 refer flag variables regardless RUBY_DEBUG_ENV
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-15 06:17:29 +00:00
nobu 1a7ed01d6c fix typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-14 14:27:07 +00:00
svn f91ed43d65 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-14 14:09:58 +00:00
eregon a5b83b03ad Update to ruby/spec@032022ca
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-14 14:09:56 +00:00
svn d593aed7b7 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-14 14:09:30 +00:00
eregon 6dd3ff482f Update to ruby/mspec@4b980493
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-14 14:09:29 +00:00
nobu e3d4de3512 suppress a warning [ci skip]
* thread_sync.c (rb_mutex_num_waiting): suppress warning C4700 by
  VC, uninitialized local variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-14 13:01:46 +00:00
nobu dc6d7cc58e object.c: use a sized enumerator with #yield_self
* object.c (rb_obj_size): The #yield_self Enumerator instance
  always has a #count of `1`.  This provides a lazy #size of `1`
  to match the count instead of `nil`.  [Fix GH-1615]

Author:    Shannon Skipper <shannonskipper@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-14 11:45:00 +00:00
naruse 7334e2f836 Don't read non .rb file as a spec
To avoid reading `core` file on reading core/ specs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-14 11:36:01 +00:00
nobu 0e2e2cf4a1 suppress warning
* spec/rubyspec/optional/capi/ext/fixnum_spec.c: suppress
  unused-but-set-variable warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-14 03:53:59 +00:00
nobu 9ab667b856 exts.mk.tmpl: fix multiple rubies
* template/exts.mk.tmpl: get rid of making multiple rubies
  simultaneously.  it can cause making libruby in parallel.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-14 03:33:01 +00:00
nobu 42624856a8 tgamma on mingw
* configure.in: get rid of unreliable tgamma() implemented of
  mingw, which returns NaN unexpectedly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-14 01:03:15 +00:00
nobu f3a49ebc92 string.c: cut down intermediate string
* string.c (rb_external_str_new_with_enc): cut down intermediate
  string for conversion source, by appending with conversion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-14 00:21:00 +00:00
nobu 7323de517d revert r58703 & r58705
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-13 16:04:05 +00:00
svn 0843c1ca37 * 2017-05-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-13 15:23:39 +00:00
usa 8675dd7b53 The exception raised when exec/spawn unexecutable file on Windows is various
It seems that depend on OS version or filesystem


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-13 15:23:38 +00:00
nobu a3960d0a60 string.c: fix up r58703
* string.c (rb_external_str_new_with_enc): fix the case of
  conversion failure.  when conversion failed for some reason,
  just ignores the default internal encoding and returns in the
  given encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-13 14:20:19 +00:00
nobu eafeb506cd remove wrong expectation
* spec/rubyspec/core/kernel/itself_spec.rb: `object_id` may return
  different objects for each calls, and the expectation of object
  identity is done by `equal` matcher which uses `equal?` method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-13 13:54:52 +00:00
nobu 7678c0d702 string.c: cut down intermediate string
* string.c (rb_external_str_new_with_enc): cut down intermediate
  string for conversion source, by appending with conversion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-13 13:34:39 +00:00
nobu 7d52ad9e17 string.c: fix one-off bug
* string.c (rb_str_cat_conv_enc_opts): fix one-off bug.  `ofs`
  equals `olen` when appending at the end.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-13 12:31:01 +00:00
nobu aa5e3890c4 make test-rubyspec-precheck
* common.mk (yes-test-rubyspec): make test-rubyspec-precheck for
  fake.rb to setup build configuration.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-13 09:55:23 +00:00
shugo b7ff46b7a4 test/net/imap: fix race condition in test_exception_during_idle
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-13 02:05:40 +00:00
nobu 665333e314 thread_win32.c: disable currently unused functions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-13 01:16:36 +00:00
nobu d3ca0b29a6 math.c: check argument to lgamma_r
* math.c (math_lgamma): check the argument before calling math
  function `lgamma_r` for edge cases.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-13 01:05:30 +00:00
nobu 1a4a536247 math.c: check argument to tgamma
* math.c (math_gamma): check the argument before calling math
  function `tgamma` for edge cases.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-13 00:50:20 +00:00
normal 94a7a4e908 autoload: always wait on loading thread
We cannot assume autoload_provided/rb_feature_provided returning
TRUE means it is safe to proceed without waiting.  Another
thread may call rb_provide_feature before setting the constant
(via autoload_const_set).  So we must wait until autoload is
completed by another thread.

Note: this patch was tested with an explicit rb_thread_schedule
in rb_provide_feature to make the race condition more apparent
as suggested by <s.wanabe@gmail.com>:
> --- a/load.c
> +++ b/load.c
> @@ -563,6 +563,7 @@ rb_provide_feature(VALUE feature)
>      rb_str_freeze(feature);
>
>      rb_ary_push(features, rb_fstring(feature));
> +rb_thread_schedule();
>      features_index_add(feature, INT2FIX(RARRAY_LEN(features)-1));
>      reset_loaded_features_snapshot();
>  }

* variable.c (check_autoload_required): do not assume a provided
  feature means autoload is complete, always wait if autoload is
  being performed by another thread.
  [ruby-core:81105] [Bug #11384] Thanks to <s.wanabe@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-12 21:52:04 +00:00
usa 98746acff3 `notepad.exe` does not always exist in `C:\Windows`
Use `%WINDIR%\system32\drivers\etc\services` instead of `notepad.exe`.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-12 20:10:16 +00:00
nobu 34761b7f96 array.c: fix position in message
* array.c (rb_ary_insert): fix the position in error message, when
  it is less than -1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-12 17:23:46 +00:00
nobu e95cac18bd array.c: check position to insert
* array.c (rb_ary_insert): check position to insert even if no
  elements to be inserted.  [ruby-core:81125] [Bug #13558]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-12 17:02:48 +00:00
naruse 9c38f3e6c3 show GEM_HOME
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-12 17:02:25 +00:00
nobu 126aba8587 fix tgamma for inifity
* configure.in: do not use buggy tgamma() of mingw.

* missing/tgamma.c (tgamma): merge fix for inifity from
  ruby_tgamma.  since msvcr120.dll and later have tgamma, this
  implementation will not be used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-12 16:12:46 +00:00
svn ac6e069aef * 2017-05-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-12 16:01:18 +00:00