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

50985 Коммитов

Автор SHA1 Сообщение Дата
stomar 55539f9bb8 doc/signals.rdoc: fix typo
[Fix GH-1889]

From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-12 09:42:39 +00:00
nobu 19ad3b2b2d win32.c: precise time
* win32/win32.c (filetime_split, clock_gettime): keep the
  precision as possible as the FILETIME format.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-12 00:39:14 +00:00
nobu c9b8a361be intern.h: suppress warnings
* include/ruby/intern.h (rb_fd_select): turned into an inline
  function, to suppress -Waddress warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-11 23:34:11 +00:00
nobu 0534566839 ruby.c: making hidden objects
* ruby.c (add_modules): make hidden objects by particular
  functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-11 23:33:35 +00:00
svn de5e6ca2b4 * 2018-06-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-11 20:16:28 +00:00
stomar 7215cecfb5 string.c: [DOC] grammar fixes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-11 20:16:27 +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
hsbt 6f8861433d Copy gemspec from github repository and keep .document file for rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-11 11:32:10 +00:00
hsbt aa2b6c61e1 Added webrick.rb to cleanup target.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-11 11:17:30 +00:00
svn 86d425e7c8 * 2018-06-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-11 07:42:29 +00:00
hsbt dbf3e8f63a Added entries of recent updates for gemification.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-11 07:42:28 +00:00
yui-knk fff17079d7 NEWS: Add TracePoint#parameters which was introduced by r63562
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-10 07:01:53 +00:00
nobu 8389f8c3c3 random.c: fix need_secure flags
* random.c (fill_random_seed): do not need to be secure, to get
  rid of blocking at the start-up time.
  [ruby-core:87462] [Bug #14837]

* random.c (random_raw_seed): expected to be a cryptographically
  secure, as documented.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-10 06:33:15 +00:00
yui-knk 744b0bdb7b parse.y: Fix locations of none and mid-rule actions
When an empty rule or a mid-rule action is reduced,
`YYLLOC_DEFAULT` is called with the third parameter to be zero.
If we use `RUBY_SET_YYLLOC_OF_NONE` to set their locations,
sometimes the end position of NODE indicates a blank.
For example, `a.b ;` generates `NODE_CALL (line: 1, location: (1,0)-(1,4))*`,
whose end position indicates a blank.

This is because of the following reasons:

* `NODE_CALL` is created when `primary_value call_op operation2 opt_paren_args` is
  reduced to `method_call`.
* `opt_paren_args` is `none`.
* `yylex` is called and `lex.pbeg` moves before `none` is reduced, so
  the beginning position of `none` does not match with the end position of `operation2`.

To fix locations, use `YYRHSLOC(Rhs, 0)` in `YYLLOC_DEFAULT`
(0 "refers to the symbol just before the reduction").

By this change, the bottom of the location stack would be referenced,
so initialize the bottom with `RUBY_SET_YYLLOC_OF_NONE` in `%initial-action`.

Ref: https://www.gnu.org/software/bison/manual/html_node/Location-Default-Action.html#Location-Default-Action

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-10 06:22:15 +00:00
nobu 5e9ea3c75f doc/extension.rdoc: Fix small copy+paste mistake
[Fix GH-1884]

From: Lars Kanis <lars@greiz-reinsdorf.de>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-10 06:00:45 +00:00
yui-knk aee5c4338b parse.y: Fix locations of NODE_RESCUE
* parse.y (new_bodystmt): Fix locations of NODE_RESCUE
  to end with nd_else or nd_resq. Before this commit,
  locations of NODE_RESCUE included locations of nd_ensr
  of NODE_ENSURE which is a parent node of NODE_RESCUE.

  e.g. The location of the end of NODE_RESCUE is fixed:

  ```
  def a
    :b
  rescue
    :c
  ensure
    :d
  end
  ```

  * Before

  ```
  NODE_RESCUE (line: 2, location: (2,2)-(6,4))
  ```

  * After

  ```
  NODE_RESCUE (line: 3, location: (2,2)-(5,0))
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-10 05:02:26 +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
ktsj 8e95d051a8 gems/bundled_gems: update to power_assert 1.1.2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-10 00:30:57 +00:00
svn 03893f513b * 2018-06-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-09 16:05:39 +00:00
kazu d4ff568d00 Revert "Use `&.` instead of modifier if"
This reverts commit 9d015aa91cc3ec45e41be58fd836fb7f6655a624.

Because tool/extlibs.rb runs with BASERUBY that may be ruby < 2.3

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-09 16:05:38 +00:00
kazu 53ecd7f3f7 Use `&.` instead of modifier if
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-09 01:55:31 +00:00
naruse 51cfea31e5 write_timeout doc upates [skip ci]
From: MSP-Greg <MSP-Greg@users.noreply.github.com>
fix https://github.com/ruby/ruby/pull/1885

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-08 17:20:20 +00:00
svn b5b7820ec2 * 2018-06-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-08 16:32:25 +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
kazu 51b709df07 Re-add Matrix to doc/standard_library.rdoc [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-08 13:19:02 +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
nobu 46d7dc1162 [Docs] Improve documentation of String#lines
* Document about optional getline arguments
* Add examples, especially for the demonstration of `chomp: true`
[Fix GH-1886]

From: Koki Takahashi <hakatasiloving@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-08 10:45:01 +00:00
nobu dc1f272ee6 common.mk: dependency of node_name.inc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-08 10:42:48 +00:00
hsbt 54a48b979c Removed needless extension for require.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-08 08:46:52 +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
svn 77d9fbe2c6 * 2018-06-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-07 23:18:17 +00:00
yui-knk da9bd7a460 node.c: Fix format of NODE_OP_ASGN1 and NODE_OP_ASGN2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-07 23:18:16 +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
nobu 69e5eb35d3 ast.c: adjust indent
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-07 14:40:39 +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
hsbt afa7bfee8f Promote Matrix to default gems.
The upstream repository is https://github.com/ruby/matrix.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-07 12:10:24 +00:00
kazu 905e89675f Fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-07 12:06:15 +00:00
hsbt 5a10e577df Promote OpenStruct to default gems.
Upstream repository is https://github.com/ruby/ostruct.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-07 10:13:00 +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
normal 7cc12d6311 iseq.h (struct iseq_compile_data): remove cached_const field
Nobody uses it, and "git log -p -Scached_const" shows it's ever
been used in public history.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-07 01:14:09 +00:00
svn cb05ed5d4f * 2018-06-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06 20:57:49 +00:00
normal 609939f8c6 rb_vm_insn_addr2insn: use st to perform addr2insn mapping
The current VM_INSTRUCTION_SIZE is 198, so the linear search
painful during a major GC phase.

I noticed rb_vm_insn_addr2insn2 showing up at the top of some
profiles while working on some malloc-related stuff, so I
decided to attack it.

Most notably, the benchmark/bm_vm3_gc.rb improves by over 40%:

  https://80x24.org/spew/20180602220554.GA9991@whir/raw

[ruby-core:87361] [Feature #14814]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06 20:57:48 +00:00
k0kubun 0dc5068892 mjit.c: unify wording between comments and variables
Some comments say "stop", others say "finish".

I'm going to add code which dynamically stops MJIT worker, rather than
finishing it forever. So I'm thinking `stop` is more appropreate for it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06 14:36:56 +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 439e50789b Use `Net::HTTPClientException` instead of `Net::HTTPServerException`
`Net::HTTPServerException` has been deprecated since r63590. [Bug #14688]
And `net/http/responses.rb` uses the deprecated constant, so Ruby warns of the deprecation.

Example:

```bash
$ ruby -r net/http -e ''
/home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/net/http/responses.rb:22: warning: constant Net::HTTPServerException is deprecated
```

This change suppresses the warning.
From: Masataka Pocke Kuwabara <kuwabara@pocke.me>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06 12:13:16 +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 685fdbe64c fix r63587
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06 08:39:36 +00:00
ko1 37ea653080 fix r63587 with temporal patch to pass the tests. please re-fix it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06 08:34:39 +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