84707 Commits

Author SHA1 Message Date
Kevin Newton
6ba7378394 [PRISM] Enable more passing parsing tests 2024-04-02 08:21:10 -04:00
yui-knk
e816ab0b0c Remove rb_imemo_tmpbuf_t from parser
No parser semantic value types are `VALUE` then no need to
use imemo for managing semantic value stack anymore.
2024-04-02 19:37:27 +09:00
Hiroshi SHIBATA
e651395210 Warn pstore for Ruby 3.5 2024-04-02 18:34:10 +09:00
Andrew Konchin
1e5949bd60 Update to ruby/spec@573cf97 2024-04-02 10:50:30 +02:00
Yuta Saito
8b55aaa85c [Feature #20345] Add --target-rbconfig option to mkmf
Introduce a new mkmf option `--target-rbconfig` to specify the RbConfig
file for the deployment target platform. This option is useful for
cross-compiling Ruby extensions without faking the global top-level
`RbConfig` constant.
2024-04-02 14:24:54 +09:00
git
457a30df85 Update bundled gems list at a65d49ce77af76b29ee17ec64c15b7 [ci skip] 2024-04-02 02:22:51 +00:00
Hiroshi SHIBATA
a65d49ce77 Use Rake 13.2.0 2024-04-02 11:22:14 +09:00
Hiroshi SHIBATA
94f56098b1 Use fixed version of rake with ostruct 2024-04-02 11:22:14 +09:00
Hiroshi SHIBATA
4db7c8a24a Warn ostruct for Ruby 3.5 2024-04-02 11:22:14 +09:00
yui-knk
799e854897 [Feature #20331] Simplify parser warnings for hash keys duplication and when clause duplication
This commit simplifies warnings for hash keys duplication and when clause duplication,
based on the discussion of https://bugs.ruby-lang.org/issues/20331.
Warnings are reported only when strings are same to ohters.
2024-04-02 08:26:58 +09:00
yui-knk
8066e3ea6e Remove VALUE from struct rb_strterm_struct
In the past, it was imemo. However a075c55 changed it.
Therefore no need to use `VALUE` for the first field.
2024-04-02 07:26:35 +09:00
Kevin Newton
b25282e618 [ruby/prism] Replace . with decimal point for strtod
https://github.com/ruby/prism/commit/578a4f983e
2024-04-01 19:39:33 +00:00
Kevin Newton
b7597dac93 [ruby/prism] Match more error messages
https://github.com/ruby/prism/commit/0cc3a9d63a
2024-04-01 19:28:06 +00:00
Kevin Newton
d6c1cc5532 [ruby/prism] Fix up error messages for empty global variable
https://github.com/ruby/prism/commit/fa7559d40b
2024-04-01 19:28:05 +00:00
Kevin Newton
d898f00fe1 [ruby/prism] Match error messages for invalid instance/class variables
https://github.com/ruby/prism/commit/82fd0599ed
2024-04-01 19:28:05 +00:00
Kevin Newton
67bd5b33f9 [ruby/prism] Match error message for invalid class/module name
https://github.com/ruby/prism/commit/f00ae59070
2024-04-01 19:28:04 +00:00
Kevin Newton
05904c3b72 [ruby/prism] Match error message for invalid class/module definition
https://github.com/ruby/prism/commit/1879a9d22e
2024-04-01 19:28:04 +00:00
Kevin Newton
a885d597d5 [ruby/prism] Match error message for multiple blocks given
https://github.com/ruby/prism/commit/6b594d9d42
2024-04-01 19:28:04 +00:00
Kevin Newton
fee70c1ed7 [ruby/prism] Add better error messages for invalid block-locals
https://github.com/ruby/prism/commit/27ad452436
2024-04-01 19:28:03 +00:00
Kevin Newton
1e737ec977 [ruby/prism] Fix up error message for invalid numbered reference alias
https://github.com/ruby/prism/commit/74bff9e834
2024-04-01 19:28:03 +00:00
Kevin Newton
cc6668c656 [PRISM] Enable passing pattern matching tests 2024-04-01 15:08:50 -04:00
Kevin Newton
a9658b6409 [ruby/prism] Do not track locals starting with _
https://github.com/ruby/prism/commit/0d5a6d936a
2024-04-01 18:13:45 +00:00
Kevin Newton
ec879e7eac [ruby/prism] Use RubyVM::InstructionSequence instead of Ripper for validity check
https://github.com/ruby/prism/commit/ddec1c163d
2024-04-01 18:13:45 +00:00
Kevin Newton
c2735c48a1 [ruby/prism] Track duplicate hash keys for pattern matching
https://github.com/ruby/prism/commit/71ea82f299
2024-04-01 18:13:45 +00:00
Kevin Newton
f1e385aad9 [ruby/prism] Track captures in pattern matching for duplicates
https://github.com/ruby/prism/commit/aa2182f064
2024-04-01 18:13:44 +00:00
tomoya ishida
a531cac335 [ruby/reline] Refactor completion
(https://github.com/ruby/reline/pull/647)

* Refactor completion: split autocompletion and tabcompletion logic and state

* Move completion candidate listup logic from dialog proc to LineEditor

https://github.com/ruby/reline/commit/c3c09ac9c2
2024-04-01 18:12:27 +00:00
tomoya ishida
508bddc865 [ruby/reline] Align completion menu items
(https://github.com/ruby/reline/pull/613)

https://github.com/ruby/reline/commit/a622704f62
2024-04-01 16:25:26 +00:00
David Rodriguez
e2a1d0b53d [rubygems/rubygems] Improve error message when strict resolution filters out everything
https://github.com/rubygems/rubygems/commit/1ea44b3749
2024-04-01 15:03:28 +00:00
David Rodriguez
f80bb3837c [rubygems/rubygems] Keep unfiltered versions separately
https://github.com/rubygems/rubygems/commit/7b5cc51a96
2024-04-01 15:03:27 +00:00
David Rodriguez
bfdbdf7aae [rubygems/rubygems] No need to check for root package every time
https://github.com/rubygems/rubygems/commit/6ca192649f
2024-04-01 15:03:27 +00:00
David Rodriguez
b6ac37c91a [rubygems/rubygems] No need for any version prioritization when building errors
We just need to filter versions belonging to the range, but don't need
anything else.

https://github.com/rubygems/rubygems/commit/8355a225d7
2024-04-01 15:03:26 +00:00
David Rodriguez
caaafbc35e [rubygems/rubygems] Make it look more like BasicPackageSource
https://github.com/rubygems/rubygems/commit/bb5727934c
2024-04-01 15:03:26 +00:00
David Rodriguez
d69ef1cc52 [rubygems/rubygems] Let GemVersionPromoter sort in preferred order directly
So that we don't need to reverse the Array.

https://github.com/rubygems/rubygems/commit/aeea5e2e00
2024-04-01 15:03:25 +00:00
David Rodriguez
2b82b7d192 [rubygems/rubygems] Update docs
https://github.com/rubygems/rubygems/commit/ac24a68486
2024-04-01 15:03:25 +00:00
David Rodriguez
0a1e36964d [rubygems/rubygems] Remove unnecessary filtering
We do that when first caching versions, and then it's no longer
necessary.

https://github.com/rubygems/rubygems/commit/ede15847db
2024-04-01 15:03:25 +00:00
David Rodriguez
acbd91e47f [rubygems/rubygems] No need to sort twice when filling versions
https://github.com/rubygems/rubygems/commit/13294528c4
2024-04-01 15:03:24 +00:00
David Rodriguez
d342937e01 [rubygems/rubygems] Rename method for clarity
And also so that it matches the method used by main PubGrub sample
resolver class.

https://github.com/rubygems/rubygems/commit/0e612361b8
2024-04-01 15:03:24 +00:00
David Rodriguez
3ca0683529 [rubygems/rubygems] Fix typo
https://github.com/rubygems/rubygems/commit/0ddf25e5aa
2024-04-01 15:03:23 +00:00
Peter Zhu
e26ac3ab71 Test finalizer is ran in bootstraptest 2024-04-01 10:26:16 -04:00
卜部昌平
1232975398 add CI matrix for clang-19 2024-04-01 16:55:02 +09:00
Nobuyoshi Nakada
b50c4dc30a
Rename the variable
It is not an empty gzipped data, a gzipped empty dump data.
2024-04-01 16:51:28 +09:00
Nobuyoshi Nakada
70645a5acd
Write gzipped data as binary
Be careful when writing binary data on Windows.

```
$ ruby -e 's = Gem::Util.gzip("\x04\x08[\x05".b); p s.index("\n"); puts IO::Buffer.for(s).hexdump'
6
0x00000000  1f 8b 08 00 6c 3d 0a 66 00 03 63 e1 88 66 05 00 ....l=.f..c..f..
0x00000010  e3 69 10 89 04 00 00 00                         .i......
```
2024-04-01 16:03:57 +09:00
Hiroshi SHIBATA
acfef7c4f0 Use dummy data generated by RubyGems 2024-04-01 15:32:31 +09:00
S-H-GAMELINKS
0774232bf3 Remove unnecessary macros and functions for Universal Parser 2024-04-01 12:05:16 +09:00
Joshua Young
e07178d526
[DOC] Fix scope resolution operator typo in Process#wait docs 2024-04-01 01:06:10 +00:00
KJ Tsanaktsidis
80bda107c8 [ruby/resolv] Add an explicit with_udp_and_tcp helper to test_dns.rb
This helper tries to bind UDP and TCP sockets to the same port, by
retrying the bind if the randomly-assinged UDP port is already taken in
TCP. This fixes a flaky test.

[Bug #20403]

https://github.com/ruby/resolv/commit/3d135f99d9
2024-03-31 23:57:00 +00:00
KJ Tsanaktsidis
e02a06fbf2 Document how to run the tests under ASAN now that they pass! 2024-03-31 21:12:31 +11:00
KJ Tsanaktsidis
9d0a5148ae Add missing RB_GC_GUARDs related to DATA_PTR
I discovered the problem in `compile.c` from a failing
TestIseqLoad#test_stressful_roundtrip test with ASAN enabled. The other
two changes in array.c and string.c I found by auditing similar usages
of DATA_PTR in the codebase.

[Bug #20402]
2024-03-31 20:33:38 +11:00
Ellen Marie Dash
174b671699 [rubygems/rubygems] [commands/rebuild] Remove unused DATE_FORMAT constant.
https://github.com/rubygems/rubygems/commit/3c4e3fadc9
2024-03-31 02:37:13 +00:00
Aaron Patterson
9579cf45d5 If we have a shape cache we should use it
If there is a shape cache, then we should believe the results instead of
doing a linear search for non-existent items

This fixes a case where checking the index of an undefined ivar would
result in an O(n) search. Now we get O(log n).

Benchmark is as follows:

```ruby
N = ARGV[0].to_i

class ManyIVs
  class_eval "def initialize;" +
    N.times.map { "@a#{_1} = #{_1}" }.join("\n") +
    "end"

  def check
    defined?(@not)
  end
end

class Subclass < ManyIVs
  def initialize
    super
    @foo = 123
  end
end

def t
  s = Process.clock_gettime Process::CLOCK_MONOTONIC
  yield
  Process.clock_gettime(Process::CLOCK_MONOTONIC) - s
end

def test
  a = ManyIVs.new
  b = Subclass.new
  t { 200000.times { a.check; b.check } }
end

puts "#{N},#{test}"
```

On the master branch:

```
$ for i in (seq 1 3 32); ./miniruby test.rb $i; end
1,0.015619999991031364
4,0.013061000005109236
7,0.013365999999223277
10,0.015474999992875382
13,0.017674999980954453
16,0.020055999979376793
19,0.02260500000556931
22,0.0254080000158865
25,0.02806599999894388
28,0.031244999991031364
31,0.034568000002764165
```

On this branch:

```
$ for i in (seq 1 3 32); ./miniruby test.rb $i; end
1,0.015848999988520518
4,0.013225000002421439
7,0.013049000001046807
10,0.010697999998228624
13,0.010902000009082258
16,0.011448000004747882
19,0.01151199999731034
22,0.011539999977685511
25,0.01173300002119504
28,0.011900000012246892
31,0.012278999987756833
```
2024-03-30 19:24:36 -07:00