81909 Commits

Author SHA1 Message Date
Hiroshi SHIBATA
06edde22f4 [ruby/io-nonblock] Bump up 0.3.0
https://github.com/ruby/io-nonblock/commit/501e2ffea3
2023-12-13 05:42:58 +00:00
git
02f0aa6137 Update default gems list at 5cabe1e9cc6829d1918c65bf29c4ba [ci skip] 2023-12-13 05:11:39 +00:00
Hiroshi SHIBATA
5cabe1e9cc [ruby/io-wait] Bump up 0.3.1
https://github.com/ruby/io-wait/commit/5ec3db36c8
2023-12-13 05:10:54 +00:00
git
8a8fd32e13 Update default gems list at 12c775c94249b57dadfda0c2de9568 [ci skip] 2023-12-13 05:02:01 +00:00
Hiroshi SHIBATA
12c775c942 [ruby/etc] Bump up 1.4.3
https://github.com/ruby/etc/commit/743c26086d
2023-12-13 05:01:16 +00:00
David Rodríguez
ac939d9ca3 [rubygems/rubygems] Improve default gem handling
If a gem is specified in the Gemfile (or resolved as a transitive
dependency), it's always resolved from remote/installed sources. Default
gems are only used as a fallback for gems not included in the bundle.

I believe this leads to more consistent behavior and more portable apps,
since all gems will be installed to the configured bundle path,
regardless of whether they are default gems or not.

https://github.com/rubygems/rubygems/commit/091b4fcf2b
2023-12-13 13:02:22 +09:00
David Rodríguez
1a7aa5560f [rubygems/rubygems] Refactor bundle info
https://github.com/rubygems/rubygems/commit/0e919eaa87
2023-12-13 13:02:22 +09:00
David Rodríguez
70428247c6 [rubygems/rubygems] Remove dead code
https://github.com/rubygems/rubygems/commit/fad186df39
2023-12-13 13:02:21 +09:00
David Rodríguez
6b3c9cebe9 Normalize bundler bindir
This makes bundler consistent with all other gems, and makes the default
installation of Bundler in the release package look like any other
bundler installation.

Before (on preview3, for example), Bundler executable is installed at:

lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/libexec/bundle

Now it's installed in the standard location:

lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/exe/bundle
2023-12-13 12:59:23 +09:00
Hiroshi SHIBATA
866b6fcd69 RubyGems 3.5+ will use vendored net-http 2023-12-13 12:16:55 +09:00
Hiroshi SHIBATA
5015481e53 Removed duplicated LICENSE file 2023-12-13 12:16:55 +09:00
Vít Ondruch
befbcfd90c [rubygems/rubygems] Explain the 3 states options[:user_install] can have.
This was issue previously, so hopefully this comment tries to state this
explicitly for future readers.

https://github.com/rubygems/rubygems/commit/8ccd830f85
2023-12-13 12:16:55 +09:00
Vít Ondruch
1fa5dd883e [rubygems/rubygems] Test if the user dir is used for auto user installation
This is mainly to align this test case with the
`test_process_options_does_not_fallback_to_user_install_when_gem_home_
not_writable_and_no_user_install`, where the `install_dir` is checked
already.

https://github.com/rubygems/rubygems/commit/02b1884b61
2023-12-13 12:16:55 +09:00
Vít Ondruch
402fd96ddc [rubygems/rubygems] Make sure --no-user-install is respected for auto user installation
The `options[:user_install]` might have three states:
* `true`: `--user-install`
* `false`: `--no-user-install` and
* `nil`: option was not specified

However, this had not been respected previously and the `false` and `nil`
were treated the same. This could lead to auto user installation despite
`--no-user-install` being specified on the command line.

Fixes https://github.com/rubygems/rubygems/pull/7237

https://github.com/rubygems/rubygems/commit/9281545474
2023-12-13 12:16:55 +09:00
David Rodríguez
844759ccdb [rubygems/rubygems] Add a spec to cover what vendoring timeout fixes
https://github.com/rubygems/rubygems/commit/2662e45d75
2023-12-13 12:16:55 +09:00
David Rodríguez
5323935f57 [rubygems/rubygems] Remove no longer needed gem install during test
https://github.com/rubygems/rubygems/commit/bdb78d8289
2023-12-13 12:16:55 +09:00
David Rodríguez
20d99a2f5f [rubygems/rubygems] Resolv needs vendoring too
https://github.com/rubygems/rubygems/commit/cdfc6923e4
2023-12-13 12:16:55 +09:00
David Rodríguez
f188a41afe [rubygems/rubygems] Use vendored timeout from RubyGems
https://github.com/rubygems/rubygems/commit/cfc5018c54
2023-12-13 12:16:55 +09:00
David Rodríguez
a7c9163b5d [rubygems/rubygems] Vendor timeout in RubyGems too
https://github.com/rubygems/rubygems/commit/e2e7440ede
2023-12-13 12:16:55 +09:00
David Rodríguez
90317472e8 [rubygems/rubygems] Use vendored net-http in Bundler
https://github.com/rubygems/rubygems/commit/0d758e8926
2023-12-13 12:16:55 +09:00
David Rodríguez
ce924ce1fb [rubygems/rubygems] Vendor net-http and net-protocol in RubyGems
https://github.com/rubygems/rubygems/commit/99d91c9ed2
2023-12-13 12:16:55 +09:00
David Rodríguez
6cefad7704 [rubygems/rubygems] Avoid loading artifice when not necessary
https://github.com/rubygems/rubygems/commit/ef97ad37bd
2023-12-13 12:16:55 +09:00
David Rodríguez
7d5d2eef78 [rubygems/rubygems] Load hax.rb before anything when BUNDLER_IGNORE_DEFAULT_GEM set
https://github.com/rubygems/rubygems/commit/111bd11c36
2023-12-13 12:16:55 +09:00
David Rodríguez
8d1a203664 [rubygems/rubygems] Require rubygems/request where it's used
https://github.com/rubygems/rubygems/commit/73b9498658
2023-12-13 12:16:55 +09:00
Jemma Issroff
196c24620e [PRISM] Correctly parse non-base 10 integers in Prism
This commit passes an `end` to rb_int_parse_cstr which allows us
to correctly parse non-base 10 integers which are enclosed in
parenthesis. Prior to this commit, we were getting a putobject nil
when compiling `(0o0)` for example.
2023-12-12 22:00:50 -05:00
KJ Tsanaktsidis
a2994c300b Add changelog entry for [Feature #20057] 2023-12-13 13:35:05 +11:00
KJ Tsanaktsidis
a8d2d93aff Add a test case for preregistering with different data
We want to make sure that if preregister is called with different data,
that the postponed job table is updated.
2023-12-13 13:35:05 +11:00
KJ Tsanaktsidis
15d14e2f39 Simplify implementation of tracepoint tests
With the latest version of the postponed job patchset merged, we don't
actually need to go through the contortions of keeping the data in a
global variable; we can just update `data` with multiple calls to
rb_postponed_job_preregister.
2023-12-13 13:35:05 +11:00
KJ Tsanaktsidis
4eefab592a Refactor local variable names in postponed_job methods
Just removes the unneeded `prereg_` prefix from a few local var names.
2023-12-13 13:35:05 +11:00
KJ Tsanaktsidis
626daa73ec Small doc improvements for rb_postponed_job API 2023-12-13 13:35:05 +11:00
Ufuk Kayserilioglu
e96f6126f2 [ruby/prism] Fix hash deopt based on contents
The previous implementation of hash deopt was based on clearing the static literal flag on a hash node if the element that was being added was an array, hash or range node, or if the element was not a static literal in the first place.

However, this is not correct. First of all, the elements added to a hash node will primarily be assoc nodes, but never array, hash or range nodes. Secondly, the static literal flag is set on assoc nodes, only if the value in an assoc node is a static literal, so the key is never checked. As a result, the static literal flag on a hash node would never be cleared if the key wasn't a static literal.

This commit fixes this by clearing the static literal flag if:
1. the element is not an assoc node,
2. the element is an assoc node, but the key is not a static literal, or
3. the element is an assoc node, the key is a static literal, but assoc node (and thus the value in assoc node) is not a static literal.

https://github.com/ruby/prism/commit/7f67109b36
2023-12-13 00:21:42 +00:00
Peter Zhu
2350c79462 Use xfree for IO::Buffer
Since IO::Buffer is allocated using TypedData_Make_Struct, it must use
xfree to free the buffer otherwise it will cause more major GC to run.

Example:

```
10.times do
  1_000_000.times { IO::Buffer.new(0) }

  puts "oldmalloc_increase_bytes: #{GC.stat(:oldmalloc_increase_bytes)}, major_gc_count: #{GC.stat(:major_gc_count)}"
end
```

Before:

```
oldmalloc_increase_bytes: 14904176, major_gc_count: 3
oldmalloc_increase_bytes: 2399424, major_gc_count: 5
oldmalloc_increase_bytes: 5204640, major_gc_count: 6
oldmalloc_increase_bytes: 2199936, major_gc_count: 7
oldmalloc_increase_bytes: 34199936, major_gc_count: 7
oldmalloc_increase_bytes: 24223360, major_gc_count: 8
oldmalloc_increase_bytes: 5967616, major_gc_count: 9
oldmalloc_increase_bytes: 37967616, major_gc_count: 9
oldmalloc_increase_bytes: 9689792, major_gc_count: 10
oldmalloc_increase_bytes: 41689792, major_gc_count: 10
```

After:

```
oldmalloc_increase_bytes: 117392, major_gc_count: 2
oldmalloc_increase_bytes: 26128, major_gc_count: 2
oldmalloc_increase_bytes: 71600, major_gc_count: 2
oldmalloc_increase_bytes: 117072, major_gc_count: 2
oldmalloc_increase_bytes: 17296, major_gc_count: 2
oldmalloc_increase_bytes: 62768, major_gc_count: 2
oldmalloc_increase_bytes: 108240, major_gc_count: 2
oldmalloc_increase_bytes: 153712, major_gc_count: 2
oldmalloc_increase_bytes: 53936, major_gc_count: 2
oldmalloc_increase_bytes: 99408, major_gc_count: 2
```
2023-12-12 18:47:58 -05:00
BurdetteLamar
18a5b6b7e9 [DOC] RDoc for Complex 2023-12-12 17:32:59 -05:00
Alan Wu
9f77eb1f5a Remove unused macros 2023-12-12 17:24:17 -05:00
Alan Wu
d4bbee7475
YJIT: Fix off-by-one in Kernel#send type handling (#9212)
Previously, if the method ID argument happens to be on one below the top
of the stack, we didn't overwrite the type of the stack slot, which
leaves an incorrect type for the stack slot. The included script tripped
asserts both with and without --yjit-verify-ctx.
2023-12-12 22:10:14 +00:00
Takashi Kokubun
6e491cae5d
Move --repeat-count=2 job to macos-arm-oss (#9208) 2023-12-12 13:01:09 -08:00
eileencodes
a6526342f3 [PRISM] Fix segv with regex once flag
When you have an interpolated regex with a `once` flag and local
variable is outside the block created by the `once` flag, Prism would
see a segv. This is because it was not taking the depth into account.

To fix this, we need to add 1 to the `local_depth_offset` on the
`scope`.

Fixes: ruby/prism#2047
2023-12-12 15:15:02 -05:00
David Rodríguez
1572322e17
Sync with upstream rubygems (#9206) 2023-12-12 11:49:25 -08:00
Takashi Kokubun
0366c424e5 Remove a duplicated job
This was first added in b481b673d75, but 197e91f357 added
-DUNIVERSAL_PARSER to the Compilers workflow as well.

Given the nature of this test and the fact that it also runs make
test-all besides make test, I think it's better to keep only the
Compilers one.
2023-12-12 11:45:48 -08:00
Takashi Kokubun
fd7decbf04 Allow syncing tool/bundler 2023-12-12 11:19:02 -08:00
Matt Valentine-House
43ede3f26c [PRISM] Compile NextNode arguments 2023-12-12 13:46:36 -05:00
Stan Lo
d1cf793adc [ruby/irb] Remove documents about deprecated/WIP features and some
slight adjustments
(https://github.com/ruby/irb/pull/811)

https://github.com/ruby/irb/commit/6a9193e88b
2023-12-12 18:46:07 +00:00
Jemma Issroff
b9dfe04a73 [PRISM] Implementing forwarding of args for ForwardingSuperNode
ForwardingSuperNodes need to actually forward any applicable
arguments. This commit implements that logic, by using the data
stored on the local iseq about the parameters to forward the
appropriate arguments.
2023-12-12 13:45:21 -05:00
Jemma Issroff
68753e4408 [PRISM] Allow rest parameter to be *
Prior to this commit, if a rest parameters was `*`, we did not add
it to the locals table correctly. This commit fixes that.
2023-12-12 13:45:21 -05:00
Kevin Newton
f61df27b4c [ruby/prism] Use new flag setters for attribute write
https://github.com/ruby/prism/commit/1e07832778
2023-12-12 18:43:59 +00:00
Kouhei Yanagita
06e2fbb826 [Bug #19114] Fix for multiple calls of TracePoint#enable 2023-12-12 09:36:37 -08:00
Ufuk Kayserilioglu
1f22245ed5 [ruby/prism] Start using flag macros/methods exclusively
https://github.com/ruby/prism/commit/5f05a6fe83
2023-12-12 17:35:53 +00:00
Ufuk Kayserilioglu
bdb38dd9f2 [ruby/prism] Add methods for setting/unsetting and macros for testing a flags
https://github.com/ruby/prism/commit/e5f37d1407
2023-12-12 17:35:52 +00:00
David Rodríguez
67940b135c [rubygems/rubygems] Bump rake version used by tests
And make it easier to update next time.

https://github.com/rubygems/rubygems/commit/1ea4bfa5d8
2023-12-12 17:16:19 +00:00
Kevin Newton
278ce27ee4 [ruby/prism] Flag for attribute write on calls
https://github.com/ruby/prism/commit/465731969c
2023-12-12 15:55:54 +00:00