Commit graph

82083 commits

Author SHA1 Message Date
Hiroshi SHIBATA
8db0de92a8
Restore tracked_files for ruby core repo 2023-12-17 05:39:16 +08:00
Nobuyoshi Nakada
ab7f54688b
Stir the hash value more with encoding index 2023-12-17 00:30:00 +09:00
Nobuyoshi Nakada
2f595c744e
Adjust styles [ci skip] 2023-12-17 00:21:00 +09:00
Hiroshi SHIBATA
40113454b1 Use regex instead of hard coded paths 2023-12-16 21:02:45 +09:00
Hiroshi SHIBATA
ab87cd0baa We don't use tracked_files in before(:suite). It breaks with release package. 2023-12-16 21:02:45 +09:00
Hiroshi SHIBATA
ad2a38dce4
Added simple test script 2023-12-16 16:36:47 +08:00
Samuel Giddins
83bdf127b8 Avoid warning when requiring bigdecimal/util when bigdecimal is in gemfile 2023-12-16 17:34:45 +09:00
Hiroshi SHIBATA
6f6b36b7e4
Added test for sub-feature like bigdecimal/util 2023-12-16 15:44:34 +08:00
Nobuyoshi Nakada
b710f96b5a
[Bug #20068] Encoding does not matter to empty strings 2023-12-16 16:00:12 +09:00
Hiroshi SHIBATA
dd49ee152b
Use minimum arguments for Bootsnap 2023-12-16 14:41:43 +08:00
git
f535f53cd6 Update default gems list at 582862754f [ci skip] 2023-12-16 05:52:30 +00:00
Hiroshi SHIBATA
582862754f [ruby/io-console] Bump up v0.7.1
8ac766d870
2023-12-16 13:51:34 +08:00
Hiroshi SHIBATA
80d63fbea5 [ruby/readline] Bump up v0.0.4
7dbc5bd8d9
2023-12-16 13:49:13 +08:00
hogelog
cb636fe707 [ruby/readline] Fix readline-ext gem loading in non Unix-like environments
6e1e5d0eb8
2023-12-16 13:49:12 +08:00
ima1zumi
20fbdae5fe [ruby/reline] Bump version to 0.4.1
(https://github.com/ruby/reline/pull/612)

8937279e0f
2023-12-16 13:47:04 +08:00
git
95064832a5 Update default gems list at 4fd3c85acd [ci skip] 2023-12-16 05:22:10 +00:00
Hiroshi SHIBATA
4fd3c85acd
[ruby/ipaddr] Bump up v1.2.6
247459faa5
2023-12-16 13:20:55 +08:00
git
70e3cb8990 Update default gems list at 8936bb74c6 [ci skip] 2023-12-16 05:07:47 +00:00
Hiroshi SHIBATA
8936bb74c6 [ruby/abbrev] Bump up v0.1.2
b362e8e3b9
2023-12-16 13:06:47 +08:00
Hiroshi SHIBATA
3b6828f967 [ruby/syslog] Bump up v0.1.2
f7b29e2199
2023-12-16 13:06:37 +08:00
git
38e0ba34f4 Update default gems list at 2b3fc0407a [ci skip] 2023-12-16 04:11:38 +00:00
Hiroshi SHIBATA
2b3fc0407a
[ruby/securerandom] Bump up v0.3.1
890d659970
2023-12-16 12:10:38 +08:00
git
7c1ec8ae50 Update default gems list at 6a79e53823 [ci skip] 2023-12-16 04:01:59 +00:00
Hiroshi SHIBATA
6a79e53823
Rollback to released version numbers of stringio and strscan 2023-12-16 12:00:59 +08:00
git
775305763a Update default gems list at 1a244730a9 [ci skip] 2023-12-16 03:49:53 +00:00
Hiroshi SHIBATA
1a244730a9
[ruby/open3] Bump up v0.2.1
b890922205
2023-12-16 11:48:49 +08:00
git
013e1ef514 Update default gems list at 6c7c4ac407 [ci skip] 2023-12-16 03:43:35 +00:00
Hiroshi SHIBATA
6c7c4ac407 [ruby/rdoc] Bump up v6.6.2
895f1affc0
2023-12-16 11:42:30 +08:00
Hiroshi SHIBATA
d242e8416e
Revert all of commits after Prism 0.19.0 release
We should bundle released version of Prism for Ruby 3.3.0
2023-12-16 11:08:51 +08:00
git
122341305f Update default gems list at 711e85674e [ci skip] 2023-12-16 02:31:02 +00:00
Hiroshi SHIBATA
711e85674e
Pin versions that are RubyGems 2.5.1 and Bundler 2.5.1 2023-12-16 10:13:35 +08:00
Samuel Giddins
f4e9336d43
Partly pick commit from https://github.com/rubygems/rubygems/pull/7285
Refactor vendoring to allow validating vendoring is reproducible

  Helps ensure that unsuspecting diffs to the vendored code arent accidentally introduced
2023-12-16 10:13:20 +08:00
David Rodríguez
d5af5a48a5
Fix Sinatra warning during specs
Some specs now print the following warning:

```
/path/to/bundler/tmp/1/gems/base/ruby/3.2.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:902: warning: constant Tilt::Cache is deprecated
```

Updating sinatra to latest & greatest fixes it.

Update other deps too since at it.
2023-12-16 10:09:50 +08:00
David Rodríguez
7cd4282cc8 [rubygems/rubygems] Fix Bundler daily CI
A default Bundler copy with vendored net-http is causing a Bundler spec
to end up loading that copy instead of the copy of Bundler under test.
This is because of vcr, but we don't really need vcr in the command
that's failing, so I avoided loading it.

304ab6e1b9
2023-12-16 10:07:52 +08:00
David Rodríguez
0ff34aa13e [rubygems/rubygems] More improves to default gem home selection for installation
966daf7d42
2023-12-16 10:07:05 +08:00
David Rodríguez
299eb8d117 [rubygems/rubygems] Improve command suggestion when gems are missing
Previous attempt to use a full path when the running version is
different than the one that would be activated by default are different
was not correct.

This is because if this error happens in a `bundle exec` context, the
`Gem.loaded_specs` is cleared because we're in an exec'd process, so
will be always using a full path in these cases.

This alternative approach should do what I was expecting.

e0bb8bf51b
2023-12-16 10:06:07 +08:00
David Rodríguez
c8e9cd2b8b [rubygems/rubygems] Fix Ruby DSL no longer working as expected
f6258e5679

Co-authored-by: AndrewSwerlick <andrew.swerlick@gmail.com>
2023-12-16 10:04:38 +08:00
eileencodes
b8074c2f04 [PRISM] Fix incorrect instructions for default_proc=
This is kind of specific and was found via debugging ruby/prism#2061 but
does not actually fix that issue.

The change here checks for `!popped` for the additional instructions
that are normally added for nodes with the `attribute_write` flag.

I also removed the extra catch table by deleting the
`ISEQ_COMPILE_DATA(iseq)->catch_except_p = true;` line. I'm...not
entirely sure why it was added but it doesn't match the upstream
compiler
[code](92b10f5be7/compile.c (L887-L892)).

The changes here unfortunately don't improve the test failures mentioned in
the linked issue so we still have other issues with instructions for
hashes.

Instructions before:

```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(34,8)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 1] h@0
0000 putnil                                                           (  32)[Li]
0001 putobject                              true
0003 getconstant                            :Hash
0005 send                                   <calldata!mid:new, argc:0, ARGS_SIMPLE>, nil
0008 setlocal                               h@0, 0
0011 getlocal                               h@0, 0                    (  33)[Li]
0014 putspecialobject                       1
0016 send                                   <calldata!mid:lambda, argc:0, FCALL>, block in <compiled>
0019 send                                   <calldata!mid:default_proc=, argc:1, ARGS_SIMPLE>, nil
0022 pop
0023 getlocal                               h@0, 0                    (  34)[Li]
0026 putobject                              :nope
0028 send                                   <calldata!mid:[], argc:1, ARGS_SIMPLE>, nil
0031 leave

== disasm: #<ISeq:block in <compiled>@<compiled>:33 (33,19)-(33,32)>
local table (size: 2, argc: 2 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 2] _@0<Arg>   [ 1] _@1<Arg>
0000 putobject                              true                      (  33)[LiBc]
0002 leave                                  [Br]
true
"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:31 (31,0)-(33,8)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 1] h@0
0000 putnil                                                           (  31)[Li]
0001 putobject                              true
0003 getconstant                            :Hash
0005 send                                   <calldata!mid:new, argc:0, ARGS_SIMPLE>, nil
0008 setlocal                               h@0, 0
0011 putnil                                                           (  32)[Li]
0012 getlocal                               h@0, 0
0015 putspecialobject                       1
0017 send                                   <calldata!mid:lambda, argc:0, FCALL>, block in <compiled>
0020 setn                                   2
0022 send                                   <calldata!mid:default_proc=, argc:1, ARGS_SIMPLE>, nil
0025 pop
0026 pop
0027 getlocal                               h@0, 0                    (  33)[Li]
0030 putobject                              :nope
0032 send                                   <calldata!mid:[], argc:1, ARGS_SIMPLE>, nil
0035 leave                                                            (  31)

== disasm: #<ISeq:block in <compiled>@<compiled>:32 (32,17)-(32,32)>
== catch table
| catch type: redo   st: 0000 ed: 0002 sp: 0000 cont: 0000
| catch type: next   st: 0000 ed: 0002 sp: 0000 cont: 0002
|------------------------------------------------------------------------
local table (size: 2, argc: 2 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 2] _@0<Arg>   [ 1] _@1<Arg>
0000 putobject                              true                      (  32)[LiBc]
0002 leave                                  [Br]
```

Instructions after:

```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(34,8)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 1] h@0
0000 putnil                                                           (  32)[Li]
0001 putobject                              true
0003 getconstant                            :Hash
0005 send                                   <calldata!mid:new, argc:0, ARGS_SIMPLE>, nil
0008 setlocal                               h@0, 0
0011 getlocal                               h@0, 0                    (  33)[Li]
0014 putspecialobject                       1
0016 send                                   <calldata!mid:lambda, argc:0, FCALL>, block in <compiled>
0019 send                                   <calldata!mid:default_proc=, argc:1, ARGS_SIMPLE>, nil
0022 pop
0023 getlocal                               h@0, 0                    (  34)[Li]
0026 putobject                              :nope
0028 send                                   <calldata!mid:[], argc:1, ARGS_SIMPLE>, nil
0031 leave

== disasm: #<ISeq:block in <compiled>@<compiled>:33 (33,19)-(33,32)>
local table (size: 2, argc: 2 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 2] _@0<Arg>   [ 1] _@1<Arg>
0000 putobject                              true                      (  33)[LiBc]
0002 leave                                  [Br]

"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:31 (31,0)-(33,8)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 1] h@0
0000 putnil                                                           (  31)[Li]
0001 putobject                              true
0003 getconstant                            :Hash
0005 send                                   <calldata!mid:new, argc:0, ARGS_SIMPLE>, nil
0008 setlocal                               h@0, 0
0011 getlocal                               h@0, 0                    (  32)[Li]
0014 putspecialobject                       1
0016 send                                   <calldata!mid:lambda, argc:0, FCALL>, block in <compiled>
0019 send                                   <calldata!mid:default_proc=, argc:1, ARGS_SIMPLE>, nil
0022 pop
0023 getlocal                               h@0, 0                    (  33)[Li]
0026 putobject                              :nope
0028 send                                   <calldata!mid:[], argc:1, ARGS_SIMPLE>, nil
0031 leave                                                            (  31)

== disasm: #<ISeq:block in <compiled>@<compiled>:32 (32,17)-(32,32)>
local table (size: 2, argc: 2 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 2] _@0<Arg>   [ 1] _@1<Arg>
0000 putobject                              true                      (  32)[LiBc]
0002 leave                                  [Br]
```
2023-12-15 16:23:06 -05:00
Matt Valentine-House
161787f9be [PRISM] Compile CallTargetNode 2023-12-15 16:15:10 -05:00
Matt Valentine-House
5b6a4d8c12 [PRISM] Compile IndexTargetNode 2023-12-15 16:15:10 -05:00
Gopal Patel
b9542246c9 [ruby/prism] Fix majority of RBS type mismatches
62cc50e41b
2023-12-15 21:14:58 +00:00
eileencodes
2e8cfcac91 [ruby/prism] String literal hash keys should be frozen
String literal hash keys can't be mutated by the user so we should mark
them as frozen. We were seeing instructions for hashes with string
literal keys using two `putstring` instructions when it should be a
`putobject` and `putstring`.

Code example:

```ruby
{ "a" => "b" }
```

Instructions before:

```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(2,14)>
0000 putobject                              "a"                       (   2)[Li]
0002 putstring                              "b"
0004 newhash                                2
0006 leave
"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(1,14)>
0000 putstring                              "a"                       (   1)[Li]
0002 putstring                              "b"
0004 newhash                                2
0006 leave
```

Instructions after:

```
"********* Ruby *************"
== disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(2,14)>
0000 putobject                              "a"                       (   2)[Li]
0002 putstring                              "b"
0004 newhash                                2
0006 leave

"********* PRISM *************"
== disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(1,14)>
0000 putobject                              "a"                       (   1)[Li]
0002 putstring                              "b"
0004 newhash                                2
0006 leave
```

b14ae55385
2023-12-15 20:55:13 +00:00
Koichi Sasada
9c9e6d5b91 [DOC] NEWS entries for C APIs 2023-12-16 04:45:25 +09:00
Martin Emde
f933cde939 [rubygems/rubygems] Let the guards have some space to breathe
73f1609715
2023-12-15 19:36:24 +00:00
Martin Emde
d9b39093e2 [rubygems/rubygems] Use a mutex around Checksum::Store @store access
Not wrapping to_lock since access to it is single threaded and
read-only at the time of writing the lockfile.

3b53aa1b12
2023-12-15 19:36:24 +00:00
Martin Emde
1cfe874ef8 [rubygems/rubygems] Remove test-only & unused methods from Checksum::Store
79636dec12
2023-12-15 19:36:24 +00:00
Ufuk Kayserilioglu
0a31cb1a37 [ruby/prism] Finish keyword hash node flag refactor by renaming flag
7f812389f8
2023-12-15 18:45:36 +00:00
Kevin Newton
b418e5a580 Update error message in test_rubyoptions 2023-12-15 13:42:19 -05:00
Adam Hess
a604fe4262 update message to clarify compiler, not parser
Co-authored-by: Ufuk Kayserilioglu <ufuk@paralaus.com>
2023-12-15 13:42:19 -05:00
HParker
55326a915f Introduce --parser runtime flag
Introduce runtime flag for specifying the parser,

```
ruby --parser=prism
```

also update the description:

```
$ ruby --parser=prism --version
ruby 3.3.0dev (2023-12-08T04:47:14Z add-parser-runtime.. 0616384c9f) +PRISM [x86_64-darwin23]
```

[Bug #20044]
2023-12-15 13:42:19 -05:00