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

10917 Коммитов

Автор SHA1 Сообщение Дата
kazu bcaf84e89c Remove needless lines
Because both assert_equal and assert_nil do not pass at the same time.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-12 14:36:32 +00:00
kazu ed2987cb62 Use `&.` instead of modifier if
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-12 14:36:30 +00:00
kazu 91fc0a9103 Use `&.` instead of modifier if and remove needless closed?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-11 14:13:56 +00:00
kazu d89d4e93af Use `&.` instead of modifier if
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-10 03:10:13 +00:00
naruse 404b155b54 assert_raise(Net::ReadTimeout) on Windows [Bug #14829]
From: MSP-Greg <MSP-Greg@users.noreply.github.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-08 16:32:24 +00:00
nobu fa409e6cbb ast.c: fix calls
* ast.c (node_children): fix the member for method IDs as nd_mid.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-08 11:03:39 +00:00
usa f69d45351b th is nil
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-08 06:15:23 +00:00
nobu daf789b5a5 ast.c: refine AST#children
* ast.c (node_children): refined RubyVM::AST#children to include
  symbols (variables, methods, classes, etc).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-07 14:46:25 +00:00
yui-knk 6666103480 ast.c: Fix to raise `SyntaxError`
* ast.c: Fix to raise `SyntaxError` when `RubyVM::AST.parse`
  or `RubyVM::AST.parse_file` fail to parse input.
* test/ruby/test_ast.rb: Add test cases for invalid syntax.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-07 14:04:49 +00:00
naruse 265bfdfbf5 skip write_timeout test on Windows
This test is about write_timeout.
To ensure it really raised Net::WriteTimeout, skip this test on Windows,
whose write returns immediately even for large data.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-07 06:18:23 +00:00
usa d7e8017519 Some platforms immediately returns from Socket#write
* test/net/http/test_http.rb (test_timeout_during_HTTP_session_write): on some
  platforms such as Windows immediately returns from Socket#write, and have to
  wait to read its response.  So, we can not handle Net::WriteTimeout and should
  handle Net::ReadTimeout instead.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-07 02:37:44 +00:00
nobu c995315153 math.c: adjust cbrt
* math.c (math_cbrt): refine the approximation result on boundary
  values by an iteration of Newton-Raphson method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06 14:01:43 +00:00
naruse 8e37f17671 Add Net::HTTPClientException [Bug #14688]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06 09:01:04 +00:00
naruse bd7c46a7aa Introduce write_timeout to Net::HTTP [Feature #13396]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06 08:03:47 +00:00
normal 1c8b370840 test/io/console/test_io_console.rb: fix for systems where PTY is not defined
[ruby-core:87420] [Bug #14828]
Thanks-to: MSP-Greg (Greg L)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06 01:12:23 +00:00
normal 6df880c862 test/lib/jit_support.rb: spelling: s/skiped/skipped/
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 22:32:41 +00:00
normal bcd984f02f test/io/console/test_io_console.rb: ignore TTOU on FreeBSD
I'm not entirely sure why, but SIGTTOU pauses the test
when running test-all in parallel.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 22:28:49 +00:00
normal 750f1a3988 test/dtrace/helper.rb: support systemtap in dtrace tests
For the current cases, a few string substitions is enough to
make dtrace(1) scripts work with stap(1).  For more complex
scripts (maybe in the future), we may pass a hash with
implementation-specific scripts.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 21:19:50 +00:00
normal bd80fc5315 test/dtrace: enable Tracepoint for function calls
Since [Feature #14104], "trace" instructions are no
longer emitted by default, so we must enable them explicitly
for function tracing to work.

[ruby-core:85965]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 21:19:45 +00:00
normal ca9cf0e076 test/dtrace/test_method_cache.rb: avoid spewing too much
Don't output method cache clearing at startup since
it causes dtrace to drop output and break the test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 21:19:40 +00:00
normal c97952dd0f test/dtrace/test_array_create.rb: require line number
Nowadays we create empty arrays in the parse/compile
phase which gave us lineno==0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 21:19:36 +00:00
normal 2acd50ed42 test/dtrace/helper: fix check for miniruby
RbConfig::TOPDIR points to my installation prefix on my FreeBSD
and GNU/Linux systems, so there's no way miniruby exists, there.
In case we don't have miniruby, --disable=gems anyways to reduce
dtrace overhead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 21:19:31 +00:00
yui-knk 43cc8ad924 test_ast.rb: Add test cases of heredoc columns
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 00:48:12 +00:00
yui-knk 9e1bb6ed5a Move a test file
* test/-ext-/ast/test_ast.rb: This test file
  has not depended C extension since r63534,
  so move to 'test/ruby/'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 00:18:29 +00:00
mame cd0fec3728 Add TracePoint#parameters
It can be used to get the parameters' information of method and block.
There was no way to get block parameters.
It was possible but ineffective to get method parameters via Method
object: `tp.defined_class.method(tp.method_id).parameters`
TracePoint#parameters allows us to get the information easily.
[Feature #14694]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-03 05:10:41 +00:00
hsbt 46ec01cb3c Fixed wrong variable name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-02 13:55:54 +00:00
hsbt 14e196925d Added test for default gems validation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-02 08:36:00 +00:00
nobu a6273888a3 fix the condition
* test/ruby/test_rubyoptions.rb: Process.wait with WNOHANG returns
  nil while the target process is alive.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-31 07:10:39 +00:00
nobu 83b14c26aa test_rubyoptions.rb: relax timeout
* test/ruby/test_rubyoptions.rb: wait for setting process title
  until the child process dies, in the case of extra heavy loads.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-31 06:57:47 +00:00
yui-knk 46463af983 Define AST module under RubyVM [experimental]
* ext/-test-/ast/ast.c: Rename to ast.c
  and define AST module under RubyVM.
* common.mk: compile ast.c.
* ext/-test-/ast/extconf.rb: Don't need this file anymore.
* inits.c (rb_call_inits): Call Init_ast to setup AST module.
* test/-ext-/ast/test_ast.rb: Follow up the namespace change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-31 06:13:06 +00:00
hsbt b9212a7771 Ignore bundler assertions on ruby core test suite.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-30 13:03:47 +00:00
svn 5018141974 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-30 13:01:37 +00:00
hsbt 8da8d4b043 Merge RubyGems 3.0.0.beta1.
* It drop to support < Ruby 2.2
  * Cleanup deprecated methods and classes.
  * Mark obsoleted methods to deprecate.
  * and other enhancements.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-30 13:01:35 +00:00
nobu 0342fcbd51 fake.rb: fix RUBY_DESCRIPTION for MJIT
* template/fake.rb.in: reflect MJIT to RUBY_DESCRIPTION.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-29 08:47:07 +00:00
nobu dc2a979b7f time.rb: fix parsing time zone in iso8601
* lib/time.rb (Time.xmlschema): the minute in time zone designator
  can be omitted together with the preceding colon.
  [ruby-core:87277] [Bug #14790]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-28 15:35:08 +00:00
nobu 71fed537ac time.rb: fix parsing time zone in iso8601
* lib/time.rb (Time.xmlschema): a colon in time zone designator
  can be omitted.  [ruby-core:87277] [Bug #14790]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-28 15:19:38 +00:00
k0kubun f13b0fd8f3 jit_support.rb: debug check_support stderr
rubyci freebsd11zfs doesn't pass this check. I want to know the stderr.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-27 07:33:18 +00:00
k0kubun 6d38935605 jit_support.rb: cahce JIT support check
* Before
make test-all -C .ruby-svn TESTS="../test/ruby/test_jit.rb"  22.40s user 5.38s system 91% cpu 30.196 total

* After
make test-all -C .ruby-svn TESTS="../test/ruby/test_jit.rb"  12.91s user 3.33s system 91% cpu 17.648 total

Also, this makes it easier to check if JIT is actually tested, by
showing warning on stderr.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-27 05:47:43 +00:00
k0kubun 34d5625500 test_rubyoptions.rb: RbConfig::CONFIG['cppflags'] can be nil
not '' at least on AppVeyor

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-24 13:25:40 +00:00
k0kubun 8d988784c3 test_rubyoptions.rb: allow passing test_verbose
with -DMJIT_FORCE_ENABLE. With -DMJIT_FORCE_ENABLE, absence of --jit
doesn't mean JIT disabled.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-24 12:57:40 +00:00
ko1 e6ad53beaa remove VM_ENV_DATA_INDEX_ENV_PROC.
* vm_core.h (VM_ENV_DATA_INDEX_ENV_PROC): ep[VM_ENV_DATA_INDEX_ENV_PROC] is
  allocated to mark a Proc which is created from iseq block.
  However, `lep[0]` keeps Proc object itself as a block handler (Proc).
  So we don't need to keep it.

* vm_core.h (VM_ENV_PROCVAL): ditto.

* vm.c (vm_make_env_each): do not need to keep blockprocval as special value.

* vm.c (vm_block_handler_escape): simply return Proc value.

* proc.c (proc_new):  we don't need to check Env because a Proc type block
  handler is a Proc object itself.
  [Bug #14782]

* test/ruby/test_proc.rb: add a test for [Bug #14782]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-23 06:56:08 +00:00
k0kubun 3d90e2aead test_jit.rb: propagate suspicious stderr
of child ruby process to parent stderr using `Kernel#warn`.

This fixes a warning in {set,get}classvariable as well.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-22 15:48:58 +00:00
hsbt c6da9cadb3 Merge RubyGems 2.7.7
see release details here: https://blog.rubygems.org/2018/05/18/2.7.7-released.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-18 01:39:13 +00:00
nobu 989e07c0f2 range.c: === by cover?
* range.c (range_eqq): switch `Range#===` to use `cover?` instead
  of `include?`.  [Feature #14575]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-17 10:46:21 +00:00
naruse d50ecb63ec http_proxy setting should respect both parent domain and subdomain
URI::Generic: Respect no_proxy for both parent domain and
subdomains It is now possible to add just the subdomains for proxy bypass. In
a setting where the main domain needs to go through proxy while the
subdomains don't, it is now possible to just add the subdomains to the
no_proxy list.
The assumption that subdomains and the parent domain should
behave the same wrt no_proxy has been removed.

eg: Adding .example.com in no_proxy would allow example.com
to go through the proxy.

From: Harsimran Singh Maan <maan.harry@gmail.com>
fix https://github.com/ruby/ruby/pull/1748
[Bug #14345]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-17 07:40:01 +00:00
ngoto 80bf542a6c Split TestThread#test_join_limits into peaces
* test/ruby/test_thread.rb (TestThread#test_join_limit_*): Split
  TestThread#test_join_limits for investigating hang-up on Solaris.
  Each method tests only a single limit value.
  [ruby-core:87045] [Bug #14761]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-15 14:31:47 +00:00
hsbt 60fbe01353 Retry to merge fileutils-1.1.0.
* Revert "Revert "Merge fileutils-1.1.0.""
    This reverts commit 84bb8e81c2.

  * Added workaround for make mjit-headers

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-15 05:53:18 +00:00
mame 84bb8e81c2 Revert "Merge fileutils-1.1.0."
This reverts commit 99da3d2570e110d3024039102205f6d64174bf5e.
The change caused the following build failure:

```
.../ruby/lib/fileutils.rb:88:in `require': cannot load such file -- rbconfig (LoadError)
uncommon.mk:987: recipe for target 'encdb.h' failed
make: *** [encdb.h] Error 1
```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-15 04:16:08 +00:00
hsbt 6f9609867c Merge fileutils-1.1.0.
This version was migrated JRuby paches.
  https://github.com/ruby/fileutils/pull/18

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-15 01:22:36 +00:00
normal f4e451ce4b test_io_wait_uncommon: new test for uncommon file types
This should make portability problems more apparent when we try
using ppoll with rb_wait_for_single_fd on FreeBSD or other
non-Linux platforms.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-15 00:08:33 +00:00