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

50100 Коммитов

Автор SHA1 Сообщение Дата
svn 6549f20ebf * 2018-02-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-26 06:00:10 +00:00
nobu fe948e8550 make-snapshot: exporting ChangLog with git
* tool/make-snapshot (package): export ChangLog file under the
  exported directory.  Git can work only under a git repository.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-26 06:00:10 +00:00
nobu 34dc3b983b make-snapshot: remove -j option from GNUMAKEFLAGS
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-26 06:00:09 +00:00
nobu bf9d849b23 vcs.rb: .git at export
* tool/vcs.rb (VCS::GIT#export): do not remove .git directory.
  should remove it by after_export.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-26 06:00:08 +00:00
svn a60a1c031e * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-25 13:52:08 +00:00
eregon b1a8c64483 Add a new #filter alias for #select
* In Enumerable, Enumerator::Lazy, Array, Hash and Set
  [Feature #13784] [ruby-core:82285]
* Share specs for the various #select#select! methods and
  reuse them for #filter/#filter!.
* Add corresponding filter tests for select tests.
* Update NEWS.

[Fix GH-1824]

From: Alexander Patrick <adp90@case.edu>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-25 13:52:07 +00:00
nobu d1ea2f9d8f date_parse.c, date_strptime.c: ensure symbols static all
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-25 13:17:35 +00:00
nobu a32e4169e1 date_core.c: ensure symbols static all
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-25 04:49:51 +00:00
nobu d3d845396e date_core.c: defensive code
* ext/date/date_core.c (f_cmp): check comparison failure.

* ext/date/date_core.c (d_lite_step): deal with the comparison
  result more defensively.  [ruby-core:85796] [Bug #14549]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-25 04:28:11 +00:00
nobu e110c0ddc5 guard before noreturn function
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-25 03:08:40 +00:00
k0kubun 71da3c50ef process.c: guard eargp against GC
`rb_str_append` may trigger GC, and in that case eargp might be GCed.
Probably for protecting it, `RB_GC_GUARD(execarg_obj)` can be seen in
other places.

Hoping to fix:
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/569818

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-25 02:12:25 +00:00
mrkn 591baf8fe3 rb_int_powm: call rb_int_pow directly
* bignum.c (rb_int_powm): call rb_int_pow directly instead of calling `**`
  operator.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 15:36:09 +00:00
svn da9300dce5 * 2018-02-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 15:06:08 +00:00
mrkn c225d3c9b5 complex.c, rational.c: remove dead code
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 15:06:07 +00:00
mrkn daa67ca352 rational.c: simplify a branch condition
* rational.c (nurat_s_convert): simplify a branch condition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 14:56:36 +00:00
kazu 8b9a3eaba6 lib/erb.rb: Add uplevel to warn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 08:54:19 +00:00
naruse b81538d259 Judge ERB version not RUBY_VERSION but ERB.version
On cross compilation, ruby command uses fake RUBY_VERSION.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 02:58:41 +00:00
naruse 22acbed662 On getting changelog, use git-log with --no-notes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 02:58:39 +00:00
nobu 1bfe28e2e8 version.h: get rid of duplication
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 02:55:03 +00:00
nobu 4704a0dc3b test for r62555
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 02:48:09 +00:00
nobu 789853edc6 rational.c: removed needless calc
* rational.c (read_num): exp(0) is 1, no need to multiply.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 02:45:12 +00:00
nobu f954caea43 rational.c: segfault on Rational exponent
* rational.c (read_num): fix segfault on Rational() with positive
  but less than the length of fractional part exponent.  should be
  negated to convert to divisor which is a reciprocal.
  [ruby-core:85783] [Bug #14547]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 02:08:36 +00:00
nobu 623160916d Improve Array#sample with random documentation
* array.c (rb_ary_sample): Adds examples for the use of the
  optional parameter random for Array#sample and unifies the style
  with the documentation of Array#shuffle.

[Fix GH-1825]

From: Alberto Almagro <alberto.almagro@rakuten.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 01:12:51 +00:00
k0kubun e5d5cc4a88 NEWS: elaborate on JIT for 2.6.0-preview1 [ci skip]
This information is backported from the draft of 2.6.0-preview1 release
note. NEWS for final 2.6.0 release will be different.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 01:05:20 +00:00
nobu 35ab341cf2 Fix typo: blcok -> block
Typo in a comment about "evaluator body".

[Fix GH-1824]

From: hkdnet <satoko.itse@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 01:02:58 +00:00
svn f64457180a * 2018-02-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 00:40:37 +00:00
k0kubun 07a4943d55 mjit.c: fix deadlock on marking MJIT's ISeq
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 00:40:36 +00:00
nobu daad618740 eval_error.c: rb_error_write flags
* eval_error.c (rb_error_write): add highlight and reverse mode
  flags.  defaulted to rb_stderr_tty_p() if Qnil.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-23 08:39:03 +00:00
nobu 28278b836b groups_spec.rb: get rid of limit on macOS
* spec/ruby/core/process/groups_spec.rb: on macOS, getgroups(2)
  has a variant which has no limit but not setgroups(2).  so the
  default groups may exceed the limit.  as the call of setgroups
  is expected to fail here, the content does not matter.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-23 08:32:33 +00:00
hsbt 2e1b00647c Update minitest-5.11.3 on bundled gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-23 05:09:11 +00:00
nobu 26741c97f4 Use Process::Tms
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-23 03:45:55 +00:00
nobu 96db72ce38 [DOC] missing docs at toplevel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-23 02:18:52 +00:00
nobu b9d01e2257 [DOC] obsolete classes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-23 02:16:43 +00:00
nobu 16ef24ac08 [DOC] nodoc internal methods/classes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-23 02:16:42 +00:00
nobu 4739266ad4 [DOC] hide declaration from rdoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-23 02:16:41 +00:00
nobu 44c53ee473 process.c: deprecated Struct::Tms
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-23 02:16:41 +00:00
eregon abf3d25df2 test/ruby/test_rubyoptions.rb: fix typo and only expect +JIT for CRuby
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22 15:34:17 +00:00
k0kubun 2d1a415470 ruby.c: fix typo in r62530
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22 15:29:33 +00:00
svn c273cbca19 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22 15:11:13 +00:00
k0kubun 666cafbeff test_rubyoptions.rb: don't test --jit if not supported
test/lib/jit_support.rb: carved out JITSupport
test/ruby/test_jit.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22 15:11:12 +00:00
svn 073c8cfee4 * 2018-02-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22 15:03:09 +00:00
k0kubun 8038bb2f96 tool/generic_erb.rb: check ERB version
instead of Ruby's.

When older ERB is installed but Ruby is still 2.6.0, this may cause
error like:

```
Traceback (most recent call last):
    5: from ../src/tool/generic_erb.rb:36:in `<main>'
    4: from ../src/tool/generic_erb.rb:36:in `map'
    3: from ../src/tool/generic_erb.rb:43:in `block in <main>'
    2: from ../src/tool/generic_erb.rb:43:in `block (2 levels) in <main>'
    1: from /opt/local/lib/ruby/2.6.0/erb.rb:873:in `result'
/opt/local/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError)
```

For safety, I changed this to check ERB's version. See also: r62529.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22 15:03:08 +00:00
k0kubun 171c496e50 version.c: show +JIT when --jit is passed
in version output.
version.h: ditto
ruby.c: propagate option for it
common.mk: updated dependency for version.c

mjit.c: overwrites the RUBY_DESCRIPTION to have +JIT when --jit is passed

test/ruby/test_rubyoptions.rb: add test for them

Only `ruby --jit -v` will have "+JIT", but this is intentional.
This may not be convenient for debugging by ticket with `ruby -v`,
but it's convenient for benchmark tools that pass options (--jit)
when showing it. At least such behavior is planned for benchmark_driver.gem
and this behavior is designed for it. Other benchmark tools are
recommended to follow the behavior too if they show version.
RUBY_DESCRIPTION might be useful for it too.

The position of "+JIT" is changed from original proposal because other
platforms like JRuby and TruffleRuby end it with archtecture.
It's made similar to JRuby, but it's upper-cased because Matz made approval
for "+JIT" in the ticket.

Example:
$ ruby -v
ruby 2.6.0dev (2018-02-22 trunk 62529) [x86_64-linux]
$ ruby --jit -v
ruby 2.6.0dev (2018-02-22 trunk 62529) +JIT [x86_64-linux]

After --jit is made default in the future, this output may be removed.
So do not rely on this output if possible.

[Feature #14462]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22 14:53:17 +00:00
k0kubun cc777d09f4 erb.rb: deprecate safe_level of ERB.new
Also, as it's in the middle of the list of 4 arguments, 3rd and 4th arguments
(trim_mode, eoutvar) are changed to keyword arguments.
Old ways to specify arguments are deprecated and warned now.

bin/erb: deprecate -S option.

We'll remove all of deprecated ones at Ruby 2.7+.

enc/make_encmake.rb: stopped using deprecated interface
ext/etc/mkconstants.rb: ditto
ext/socket/mkconstants.rb: ditto
sample/ripper/ruby2html.rb: ditto
spec/ruby/library/erb/defmethod/def_erb_method_spec.rb: ditto
spec/ruby/library/erb/new_spec.rb: ditto
test/erb/test_erb.rb: ditto
test/erb/test_erb_command.rb: ditto
tool/generic_erb.rb: ditto
tool/ruby_vm/helpers/dumper.rb: ditto
tool/transcode-tblgen.rb: ditto
lib/rdoc/erbio.rb: ditto
lib/rdoc/generator/darkfish.rb: ditto

[Feature #14256]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22 13:28:25 +00:00
nobu 1727c83584 Fix CMDARG manipulation
* parse.y: Fix CMDARG manipulation. Use CMDARG_P to identify
  keyword_do/keyword_do_block.  [Feature #14506] [Fix GH-1823]

From: Ilya Bylich <ibylich@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22 12:51:41 +00:00
nobu 95208d59ca Ignore rb_mjit_min_header- instead of rb_mjit_header-
[Fix GH-1822]

From: hkdnet <satoko.itse@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22 07:34:43 +00:00
nobu 8a1706a4b0 Ignore /mjit_config.h
[Fix GH-1822]

From: hkdnet <satoko.itse@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22 07:34:42 +00:00
nobu 74009968ce NEWS: fixed unintentional description list [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22 05:06:46 +00:00
nobu 5d874cf1aa NEWS: fixed unintentional description list [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22 04:55:58 +00:00
nobu 5fe33f07d4 NEWS: adjust layout [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22 04:13:02 +00:00