| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The method has two different concerns not straightforward to
distinguish.
One is to set a new `install_path`, which is done by setting the
`@install_path` instance variable, and invalidating the `local_specs`
memoization, so that the next time they are picked from the new
location.
The other one is to set a new `cache_path` which is done by setting the
`@cache_path` instance variable, and invalidating the `git_proxy`
memoization, so that the next git proxy uses the new cache location.
This commit splits the logic so that this is easier to understand.
https://github.com/rubygems/rubygems/commit/55904094e8
|
|
|
|
|
|
|
| |
We want local overrides to behave just like "path gems" but per-app
caches are different.
https://github.com/rubygems/rubygems/commit/797d717a2d
|
|
|
|
|
|
| |
For consistency with the rest of usages in this class.
https://github.com/rubygems/rubygems/commit/69f9ab34b1
|
|
|
|
| |
https://github.com/rubygems/rubygems/commit/fbb4ce168c
|
|
|
|
|
|
|
|
|
| |
It's not obvious that the git source actually reinstalls a proper
checkout of the repository on usage if necessary. This adds a debugging
message to log that, just like it's done when explicitly installing the
source.
https://github.com/rubygems/rubygems/commit/04e8e42a43
|
|
|
|
|
|
| |
This ensures that instance variable ordering cannot cause non-determinism in serialized gems
https://github.com/rubygems/rubygems/commit/0e912704f7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* `bundle exec` assigns `Gem::Specification.all` to the set of specs
known to Bundler (a `Bundler::SpecSet`).
* `gem uninstall` recently started calling `#delete` on the set of specs
stored in `Gem::Specification#all`. This, in RubyGems, is just an
array of specs, so has a `#delete` method that receives a single
element.
* However, at some point I added a `SpecSet#delete` method that takes an
array of specs, breaking the "Array-like" contract and making `gem
uninstall` break when run in a `bundle exec` context.
The fix is to make `Bundler::SpecSet#delete` handle being given a single
spec.
https://github.com/rubygems/rubygems/commit/e3acb7b01d
|
|
|
|
|
|
| |
And get specs passing.
https://github.com/rubygems/rubygems/commit/c23b5f5b84
|
|
|
|
| |
https://github.com/rubygems/rubygems/commit/0f2db73619
|
|
|
|
|
|
| |
Use the standard sources to avoid having to explictly pass ENV with the repo.
https://github.com/rubygems/rubygems/commit/95055dba57
|
|
|
|
| |
https://github.com/rubygems/rubygems/commit/0658903e25
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following code crashes because the GC ran during finalizers will
cause T_ZOMBIE objects to be on the heap, which crashes when we call
rb_gc_obj_free on it:
raise_proc = proc do |id|
GC.start
end
1000.times do
ObjectSpace.define_finalizer(Object.new, raise_proc)
end
|
|
|
|
| |
https://github.com/ruby/prism/commit/18a8597276
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
https://github.com/ruby/prism/commit/3d39b7961f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When loading a non-ASCII compatible file, an error is raised which
causes memory leak.
For example:
require "tempfile"
Tempfile.create do |f|
f.write("# -*- coding: UTF-16BE -*-")
f.flush
10.times do
20_000.times do
begin
load(f.path)
rescue
end
end
puts `ps -o rss= -p #{$$}`
end
end
Before:
33904
49072
64528
79216
94576
109504
124768
139536
154928
170256
After:
19568
21296
21664
21728
22192
22256
22416
22272
22272
22272
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit introduce `RubyVM::AbstractSyntaxTree::Node#locations` method
and `RubyVM::AbstractSyntaxTree::Location` class.
Ruby AST node will hold multiple locations information.
`RubyVM::AbstractSyntaxTree::Node#locations` provides a way to access
these locations information.
`RubyVM::AbstractSyntaxTree::Location` is a class which holds these location information:
* `#first_lineno`
* `#first_column`
* `#last_lineno`
* `#last_column`
|
|
|
|
| |
No point repeating the work callers to this function already do.
|
|
|
|
| |
https://github.com/ruby/prism/commit/4c55409794
|
|
|
|
| |
https://github.com/ruby/prism/commit/5d5bf92be8
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example, the following code leaks:
code = 1000.times.map { |i| "var#{i} = 1" }.join("\n")
10.times do
1000.times do
RubyVM::InstructionSequence.compile_prism(code)
end
puts `ps -o rss= -p #{$$}`
end
Before:
70384
88032
103856
115712
125584
132768
144784
152624
165296
180608
After:
62368
78784
74512
87712
85072
77728
69424
74992
71264
81440
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[Bug #20641] `Gem::BUNDLED_GEMS.warning?` adds a lot of extra
work on top of `require`. When the call end up atually loading code
the overhead is somewhat marginal.
However it's not uncommon for code to go some late `require` in some
paths, so it's expected that calling `require` with something already
required is somewhat fast, and `bundled_gems.rb` breaks this assumption.
To avoid this, we can have a fast path that in most case allow to
short-circuit all the heavy computations. If we extract the feature
basename and it doesn't match any of the bundled gems we care about
we can return very early.
With this change `require 'date'` is now only 1.33x slower on Ruby
3.3.3, than it was on Ruby 3.2.2, whereas before this change it
was at least 100x slower.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.12 to 3.25.13.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/4fa2a7953630fd2f3fb380f21be14ede0169dd4f...2d790406f505036ef40ecba973cc774a50395aac)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
|
|
|
|
| |
with globals
https://github.com/ruby/uri/commit/7a64e0245f
|
|
|
|
|
| |
Unparenthesize the argument and make `command_call` when calling with
`do`-block.
|
|
|
|
| |
`$5`, `brace_block` is no longer assigned in this action.
|
|
|
|
| |
call
|
|
|
|
|
|
|
| |
Enumerator#zip yields a single array, not multiple arguments,
so Enumerator::Lazy#zip should do the same.
Fixes [#20623]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example:
```
undef a, b
```
Before:
```
@ NODE_UNDEF (id: 1, line: 1, location: (1,6)-(1,10))*
```
After:
```
@ NODE_UNDEF (id: 1, line: 1, location: (1,0)-(1,10))*
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change UNDEF Node to hold their items to keep the original grammar
structure.
For example:
```
undef a, b
```
Before:
```
@ NODE_BLOCK (id: 4, line: 1, location: (1,6)-(1,10))*
+- nd_head (1):
| @ NODE_UNDEF (id: 1, line: 1, location: (1,6)-(1,7))
| +- nd_undef:
| @ NODE_SYM (id: 0, line: 1, location: (1,6)-(1,7))
| +- string: :a
+- nd_head (2):
@ NODE_UNDEF (id: 3, line: 1, location: (1,9)-(1,10))
+- nd_undef:
@ NODE_SYM (id: 2, line: 1, location: (1,9)-(1,10))
+- string: :b
```
After:
```
@ NODE_UNDEF (id: 1, line: 1, location: (1,6)-(1,10))*
+- nd_undefs:
+- length: 2
+- element (0):
| @ NODE_SYM (id: 0, line: 1, location: (1,6)-(1,7))
| +- string: :a
+- element (1):
@ NODE_SYM (id: 2, line: 1, location: (1,9)-(1,10))
+- string: :b
```
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Since 730e3b2ce01915c4a98b79bb281b2c38a9ff1131
("Stop exposing `rb_str_chilled_p`"), we noticed a speed loss on a few
benchmarks that are string operations heavy. This is partially due to
routines no longer having the options to inline rb_check_frozen_inline()
in non-LTO builds. Make it an inlining candidate again to recover speed.
Testing this patch on my machine, the fannkuchredux benchmark gets a
1.15 speed-up with YJIT and 1.03 without YJIT.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ref: https://bugs.ruby-lang.org/issues/20641
Even without the reference bug, `require 'date'` isn't cheap.
```ruby
require "benchmark/ips"
require "yaml"
require "date"
100.times do |i|
$LOAD_PATH.unshift("/tmp/does/not/exist/#{i}")
end
payload = 100.times.map { Date.today }.to_yaml
Benchmark.ips do |x|
x.report("100 dates") { YAML.unsafe_load(payload) }
end
```
Before:
```
$ ruby /tmp/bench-yaml.rb
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
Warming up --------------------------------------
100 dates 416.000 i/100ms
Calculating -------------------------------------
100 dates 4.309k (± 1.2%) i/s - 21.632k in 5.021003s
```
After:
```
$ ruby -Ilib /tmp/bench-yaml.rb
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
Warming up --------------------------------------
100 dates 601.000 i/100ms
Calculating -------------------------------------
100 dates 5.993k (± 1.8%) i/s - 30.050k in 5.016079s
```
|
|
|
|
|
|
| |
prism_compile.c:5770:40: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
5770 | if (tmp_array_size >= min_tmp_array_size) {
| ^~
|
|
|
|
|
|
| |
prism_compile.c:1406:27: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
1406 | if (count >= min_tmp_hash_length) {
| ^~
|
| |
|
|
|
|
| |
https://github.com/ruby/prism/commit/22c3b559cd
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Moves return value logic of rb_define_finalizer out from
rb_gc_impl_define_finalizer.
|
| |
|
| |
|