62851 Commits

Author SHA1 Message Date
git
18bcfe7144 * 2020-09-01 [ci skip] 2020-09-01 03:16:30 +09:00
Burdette Lamar
1f4c507afb
Comply with guide for method doc: array.c (#3477)
Methods considered:

    delete_at
    slice!
    reject!
    reject
    delete_if
    zip
    transpose
    replace
    clear
    fill
2020-08-31 13:16:10 -05:00
Nobuyoshi Nakada
2e80c8347e
Deprecate iterator? method
[Feature #15547] [Fix GH-2071]
2020-08-31 22:14:14 +09:00
Sutou Kouhei
c23c880f56
[ruby/strscan] Bump version
https://github.com/ruby/strscan/commit/df90d541fa
2020-08-31 21:57:35 +09:00
Nobuyoshi Nakada
c76508b88c
[ruby/strscan] Replaced examples using $KCODE with encodings
`$KCODE` has been deprecated and not effective since years ago.

https://github.com/ruby/strscan/commit/7c4dbd4cb3
2020-08-31 21:57:35 +09:00
Kazuhiro NISHIYAMA
01f28405b1
Update version to 3.0.0 in NEWS.md 2020-08-31 20:49:08 +09:00
Yusuke Endoh
53ba9fb74e Prohibit setter method names in endless method definition
https://bugs.ruby-lang.org/issues/16746#note-26
2020-08-31 20:30:27 +09:00
Hiroshi SHIBATA
86737c509c Removed minitest and hoe because they didn't support Ruby 3 yet 2020-08-31 18:51:59 +09:00
卜部昌平
b674fc9ca2
Thread.exclusive: delete
Has been deprecated since 2069c9e031fc968d6d3d0fe30a9316851e4d91d8.

[Feature #17125][ruby-core:99636]
2020-08-31 18:08:57 +09:00
Nobuyoshi Nakada
eb9342d348
The deprecation of enumerators with block has been withdrawn
https://bugs.ruby-lang.org/issues/6670#change-75907
2020-08-31 17:45:27 +09:00
Nobuyoshi Nakada
0eec4ae851
Get rid of using Socket.gethostbyname 2020-08-31 17:45:27 +09:00
Hiroshi SHIBATA
3e1aea4613
Temporary removed minitest from bundled gems.
It requires Ruby 2.x.

  https://github.com/seattlerb/minitest/blob/master/Rakefile#L14
2020-08-31 17:18:14 +09:00
Nobuyoshi Nakada
34c20c995d
[DOC] Fixed wording [ci skip] 2020-08-31 16:53:57 +09:00
Nobuyoshi Nakada
f588caa797
[DOC] Indent a code block in NEWS [ci skip] 2020-08-31 16:53:57 +09:00
Yukihiro "Matz" Matsumoto
21c62fb670
Version number bumped to 3.0.0 from 2.8.0 (tentative).
We have decided to go forward to 3.0 this year.
2020-08-31 16:38:13 +09:00
git
9b88851c83 * 2020-08-31 [ci skip] 2020-08-31 00:34:36 +09:00
Burdette Lamar
585a659b1e
Comply with guide for method doc: array.c (#3475)
Methods considered:

    bsearch
    bsearch_index
    sort_by!
    collect
    collect!
    values_at
    select
    select!
    keep_if
    delete
2020-08-30 10:34:13 -05:00
Nobuyoshi Nakada
9eda654781
KNOWNBUGS.rb: use-after-poison since b9007b6c548f91e88fd3f2ffa23de740431fa969 2020-08-30 16:07:12 +09:00
Burdette Lamar
726f2e59f9
Comply with guide for method doc: array.c (#3474)
Methods considered:

    length
    empty?
    join
    inspect
    to_a
    to_h
    to_ary
    reverse!
    reverse
    rotate!
    rotate
    sort!
    sort
2020-08-29 15:16:02 -05:00
git
a8f11df328 * 2020-08-30 [ci skip] 2020-08-30 02:15:26 +09:00
Burdette Lamar
f0ad5594bf
Comply with guide for method doc: array.c (#3473)
Methods considered:

    at
    first
    last
    fetch
    index
    rindex
    []
    insert
    each
    each_index
    reverse_each
2020-08-29 12:15:06 -05:00
Benoit Daloze
d7492a0be8 Revert changes to rdoc & rubygems regarding Tempfile.open(&block)
* They likely want to support older Ruby/tempfile versions
* Reverts part of e8c3872555fc85640505974e6b1c39d315572689
2020-08-29 12:49:20 +02:00
Benoit Daloze
3beecafc2c Fix usages of Tempfile.open(&block) that expected the file to still be there after the block 2020-08-29 12:30:24 +02:00
Benoit Daloze
e8c3872555 Simplify Tempfile.open calls with a block as they now unlink the file automatically 2020-08-29 12:23:23 +02:00
Benoit Daloze
ff323b2a5c Adapt specs for the new Tempfile.open with block behavior 2020-08-29 12:11:07 +02:00
Benoit Daloze
fa21985a7a Sync with ruby/tempfile@aa9ea12d94 2020-08-29 12:05:48 +02:00
Benoit Daloze
a11b9ca01c Some fixes in NEWS.md 2020-08-29 12:00:38 +02:00
Benoit Daloze
1199f1a4aa Fix warnings related to new Socket.gethostby* deprecations 2020-08-29 11:58:56 +02:00
Benoit Daloze
232d6c4077 Use a constant instead of a global variable in sync_default_gems.rb 2020-08-29 11:51:05 +02:00
Masaki Matsushita
6d946665bd Show deprecation warning on Socket.gethostbyname and Socket.gethostbyaddr 2020-08-29 17:18:59 +09:00
Masaki Matsushita
56dd578d7e IO.copy_stream: handle EOPNOTSUP instead of ENOTSUP 2020-08-29 16:10:58 +09:00
Masaki Matsushita
93df301048 IO.copy_stream: handle ENOTSUP on copy_file_range(2)
fallback to other methods on ENOTSUP.
some RedHat kernels may return ENOTSUP on an NFS mount.
[Feature #16965]
2020-08-29 15:38:07 +09:00
Kazuhiro NISHIYAMA
c2011d1a51
Fix a typo [ci skip] 2020-08-29 12:31:05 +09:00
Burdette Lamar
45c40f5631
Comply with guide for method doc: array.c (#3469)
Methods:
- freeze
- try_convert
- new
- \<<
- push
- pop
- shift
- unshift
- []
2020-08-28 14:56:02 -05:00
Burdette Lamar
4a5dd970a7
Add alias treatment to method_documentation.rdoc (#3468)
* Add alias treatment to method_documentation.rdoc
2020-08-28 13:39:16 -05:00
git
3ffef9a032 * 2020-08-29 [ci skip] 2020-08-29 03:28:09 +09:00
Benoit Daloze
b49307c701 Update to ruby/spec@335eb9b 2020-08-28 20:26:02 +02:00
Benoit Daloze
3dd63108b0 Update to ruby/mspec@53a6e3e 2020-08-28 20:26:00 +02:00
Kazuhiro NISHIYAMA
1c138327e0
Try to fix compile error on windows
https://github.com/ruby/ruby/runs/1041040167?check_suite_focus=true#step:11:177
```
compiling ../src/re.c
re.c
../src/re.c(317): error C2057: expected constant expression
../src/re.c(317): error C2466: cannot allocate an array of constant size 0
../src/re.c(467): error C2057: expected constant expression
../src/re.c(467): error C2466: cannot allocate an array of constant size 0
../src/re.c(467): error C2133: 'opts': unknown size
../src/re.c(559): error C2057: expected constant expression
../src/re.c(559): error C2466: cannot allocate an array of constant size 0
../src/re.c(559): error C2133: 'optbuf': unknown size
../src/re.c(673): error C2057: expected constant expression
../src/re.c(673): error C2466: cannot allocate an array of constant size 0
../src/re.c(673): error C2133: 'opts': unknown size
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64\cl.EXE"' : return code '0x2'
Stop.
```
2020-08-28 22:03:06 +09:00
Nobuyoshi Nakada
7e1fddba4a
States Time.at expects rational-like argument to respond to #to_int
https://bugs.ruby-lang.org/issues/17131
2020-08-28 19:47:29 +09:00
Nobuyoshi Nakada
75c4e9b72e
Named the magic number for regexp option buffer size
In `rb_enc_reg_error_desc`, no longer kcode option is added.
2020-08-28 19:29:16 +09:00
aycabta
1f09c43628 [ruby/reline] Move width calculator methods to Reline::Unicode
https://github.com/ruby/reline/commit/f348ecd9f5
2020-08-28 11:05:18 +09:00
tompng
cdd7d41046 [ruby/reline] fix cursor_pos regexp match
https://github.com/ruby/reline/commit/1dd80ef188
2020-08-28 11:05:18 +09:00
aycabta
8882927036 [ruby/irb] Discard newlines at end of file
https://github.com/ruby/irb/commit/0b2773d91d
2020-08-28 11:05:18 +09:00
Jeremy Evans
3b24b7914c
Improve performance of partial backtraces
Previously, backtrace_each fully populated the rb_backtrace_t with all
backtrace frames, even if caller only requested a partial backtrace
(e.g. Kernel#caller_locations(1, 1)).  This changes backtrace_each to
only add the requested frames to the rb_backtrace_t.

To do this, backtrace_each needs to be passed the starting frame and
number of frames values passed to Kernel#caller or #caller_locations.

backtrace_each works from the top of the stack to the bottom, where the
bottom is the current frame.  Due to how the location for cfuncs is
tracked using the location of the previous iseq, we need to store an
extra frame for the previous iseq if we are limiting the backtrace and
final backtrace frame (the first one stored) would be a cfunc and not
an iseq.

To limit the amount of work in this case, while scanning until the start
of the requested backtrace, for each iseq, store the cfp.  If the first
backtrace frame we care about is a cfunc, use the stored cfp to find the
related iseq.  Use a function pointer to handle the storage of the cfp
in the iteration arg, and also store the location of the extra frame
in the iteration arg.

backtrace_each needs to return int instead of void in order to signal
when a starting frame larger than backtrace size is given, as caller
and caller_locations needs to return nil and not the empty array in
these cases.

To handle cases where a range is provided with a negative end, and the
backtrace size is needed to calculate the result to pass to
rb_range_beg_len, add a backtrace_size static function to calculate
the size, which copies the logic from backtrace_each.

As backtrace_each only adds the backtrace lines requested,
backtrace_to_*_ary can be simplified to always operate on the entire
backtrace.

Previously, caller_locations(1,1) was about 6.2 times slower for an
800 deep callstack compared to an empty callstack.  With this new
approach, it is only 1.3 times slower. It will always be somewhat
slower as it still needs to scan the cfps from the top of the stack
until it finds the first requested backtrace frame.

This initializes the backtrace memory to zero.  I do not think this is
necessary, as from my analysis, nothing during the setting of the
backtrace entries can cause a garbage collection, but it seems the
safest approach, and it's unlikely the performance decrease is
significant.

This removes the rb_backtrace_t backtrace_base member. backtrace
and backtrace_base were initialized to the same value, and neither
is modified, so it doesn't make sense to have two pointers.

This also removes LOCATION_TYPE_IFUNC from vm_backtrace.c, as
the value is never set.

Fixes [Bug #17031]
2020-08-27 15:17:36 -07:00
Burdette Lamar
8095114f17
Comply with guide for method doc: hash.c (#3466)
Instance methods considered (most unchanged):
- any
- dig
- \<=
- \<
- \>=
- \>
- to_proc
2020-08-27 14:54:36 -05:00
Burdette Lamar
029c7e6045
Comply with guide for method doc: hash.c (#3465)
Instance methods considered (maybe not all changed):

    invert
    merge!
    merge
    assoc
    rassoc
    flatten
    compact
    compact!
    compare_by_identity
    compare_by_identity?
2020-08-27 13:28:34 -05:00
Burdette Lamar
f332fe236c
Comply with guide for method doc: hash.c (#3464)
Instance methods considered (maybe not all changed):

    to_a
    inspect
    to_hash
    to_h
    keys
    values
    include?
    has_value?
    ==
    eql?
    hash
2020-08-27 11:52:29 -05:00
Masaki Matsushita
9658a5a849 Show deprecation warning on TCPSocket.gethostbyname 2020-08-28 01:01:51 +09:00
Aaron Patterson
5483bf8fa4
add T_ZOMBIE support to lldb scripts 2020-08-27 09:00:19 -07:00