Age | Commit message (Collapse) | Author |
|
`DSL#to_definition` already verifies this.
https://github.com/rubygems/rubygems/commit/c596f0af83
|
|
https://github.com/rubygems/rubygems/commit/0b7be7bb77
Co-authored-by: Jonathan Hefner <[email protected]>
|
|
|
|
Notes:
Merged-By: peterzhu2118 <[email protected]>
|
|
Notes:
Merged-By: peterzhu2118 <[email protected]>
|
|
This PR fixes a token incompatibility between Parser gem and `Prism::Translation::Parser` for double splat argument.
## Parser gem (Expected)
Returns `tDSTAR` token:
```console
$ bundle exec ruby -Ilib -rparser/ruby33 -ve \
'buf = Parser::Source::Buffer.new("example.rb"); buf.source = "def f(**foo) end"; p Parser::Ruby33.new.tokenize(buf)[2]'
ruby 3.4.0dev (2024-09-01T11:00:13Z master https://github.com/ruby/prism/commit/eb144ef91e) [x86_64-darwin23]
[[:kDEF, ["def", #<Parser::Source::Range example.rb 0...3>]], [:tIDENTIFIER, ["f", #<Parser::Source::Range example.rb 4...5>]],
[:tLPAREN2, ["(", #<Parser::Source::Range example.rb 5...6>]], [:tDSTAR, ["**", #<Parser::Source::Range example.rb 6...8>]],
[:tIDENTIFIER, ["foo", #<Parser::Source::Range example.rb 8...11>]], [:tRPAREN, [")", #<Parser::Source::Range example.rb 11...12>]],
[:kEND, ["end", #<Parser::Source::Range example.rb 13...16>]]]
```
## `Prism::Translation::Parser` (Actual)
Previously, the parser returned `tPOW` token when parsing the following:
```console
$ bundle exec ruby -Ilib -rprism -rprism/translation/parser33 -ve \
'buf = Parser::Source::Buffer.new("example.rb"); buf.source = "def f(**foo) end"; p Prism::Translation::Parser33.new.tokenize(buf)[2]'
ruby 3.4.0dev (2024-09-01T11:00:13Z master https://github.com/ruby/prism/commit/eb144ef91e) [x86_64-darwin23]
[[:kDEF, ["def", #<Parser::Source::Range example.rb 0...3>]], [:tIDENTIFIER, ["f", #<Parser::Source::Range example.rb 4...5>]],
[:tLPAREN2, ["(", #<Parser::Source::Range example.rb 5...6>]], [:tPOW, ["**", #<Parser::Source::Range example.rb 6...8>]],
[:tIDENTIFIER, ["foo", #<Parser::Source::Range example.rb 8...11>]], [:tRPAREN, [")", #<Parser::Source::Range example.rb 11...12>]],
[:kEND, ["end", #<Parser::Source::Range example.rb 13...16>]]]
```
After the update, the parser now returns `tDSTAR` token for the same input:
```console
$ bundle exec ruby -Ilib -rprism -rprism/translation/parser33 -ve \
'buf = Parser::Source::Buffer.new("example.rb"); buf.source = "def f(**foo) end"; p Prism::Translation::Parser33.new.tokenize(buf)[2]'
ruby 3.4.0dev (2024-09-01T11:00:13Z master https://github.com/ruby/prism/commit/eb144ef91e) [x86_64-darwin23]
[[:kDEF, ["def", #<Parser::Source::Range example.rb 0...3>]], [:tIDENTIFIER, ["f", #<Parser::Source::Range example.rb 4...5>]],
[:tLPAREN2, ["(", #<Parser::Source::Range example.rb 5...6>]], [:tDSTAR, ["**", #<Parser::Source::Range example.rb 6...8>]],
[:tIDENTIFIER, ["foo", #<Parser::Source::Range example.rb 8...11>]], [:tRPAREN, [")", #<Parser::Source::Range example.rb 11...12>]],
[:kEND, ["end", #<Parser::Source::Range example.rb 13...16>]]]
```
With this change, the following code could be removed from test/prism/ruby/parser_test.rb:
```diff
- when :tPOW
- actual_token[0] = expected_token[0] if expected_token[0] == :tDSTAR
```
`tPOW` is the token type for the behavior of `a ** b`, and its behavior remains unchanged:
```console
$ bundle exec ruby -Ilib -rprism -rprism/translation/parser33 -ve \
'buf = Parser::Source::Buffer.new("example.rb"); buf.source = "a ** b"; p Prism::Translation::Parser33.new.tokenize(buf)[2]'
ruby 3.4.0dev (2024-09-01T11:00:13Z master https://github.com/ruby/prism/commit/eb144ef91e) [x86_64-darwin23]
[[:tIDENTIFIER, ["a", #<Parser::Source::Range example.rb 0...1>]], [:tPOW, ["**", #<Parser::Source::Range example.rb 2...4>]],
[:tIDENTIFIER, ["b", #<Parser::Source::Range example.rb 5...6>]]]
```
https://github.com/ruby/prism/commit/66bde35a44
|
|
|
|
|
|
This adds keys heap_empty_pages and heap_allocatable_slots to GC.stat.
|
|
[Bug #20710]
This commit introduces moves allocatable slots and empty pages from per
size pool to global. This allows size pools to grow globally and allows
empty pages to move between size pools.
For the benchmark in [Bug #20710], this signficantly improves performance:
Before:
new_env 2.563 (± 0.0%) i/s - 26.000 in 10.226703s
new_rails_env 0.293 (± 0.0%) i/s - 3.000 in 10.318960s
After:
new_env 3.781 (±26.4%) i/s - 37.000 in 10.302374s
new_rails_env 0.911 (± 0.0%) i/s - 9.000 in 10.049337s
In the headline benchmarks on yjit-bench, we see the performance is
basically on-par with before, with ruby-lsp being signficantly faster
and activerecord and erubi-rails being slightly slower:
-------------- ----------- ---------- ----------- ---------- -------------- -------------
bench master (ms) stddev (%) branch (ms) stddev (%) branch 1st itr master/branch
activerecord 452.2 0.3 479.4 0.4 0.96 0.94
chunky-png 1157.0 0.4 1172.8 0.1 0.99 0.99
erubi-rails 905.4 0.3 967.2 0.4 0.94 0.94
hexapdf 3566.6 0.6 3553.2 0.3 1.03 1.00
liquid-c 88.9 0.9 89.0 1.3 0.98 1.00
liquid-compile 93.4 0.9 89.9 3.5 1.01 1.04
liquid-render 224.1 0.7 227.1 0.5 1.00 0.99
lobsters 1052.0 3.5 1067.4 2.1 0.99 0.99
mail 197.1 0.4 196.5 0.5 0.98 1.00
psych-load 2960.3 0.1 2988.4 0.8 1.00 0.99
railsbench 2252.6 0.4 2255.9 0.5 0.99 1.00
rubocop 262.7 1.4 270.1 1.8 1.02 0.97
ruby-lsp 275.4 0.5 242.0 0.3 0.97 1.14
sequel 98.4 0.7 98.3 0.6 1.01 1.00
-------------- ----------- ---------- ----------- ---------- -------------- -------------
|
|
|
|
|
|
[Feature #20594]
A handy method to construct a string out of multiple chunks.
Contrary to `String#concat`, it doesn't do any encoding negociation,
and simply append the content as bytes regardless of whether this
result in a broken string or not.
It's the caller responsibility to check for `String#valid_encoding?`
in cases where it's needed.
When passed integers, only the lower byte is considered, like in
`String#setbyte`.
Notes:
Merged: https://github.com/ruby/ruby/pull/11552
|
|
With a default git setup, each cloned repo in the cache will end up with
~60K of sample git hooks. These files all end in `.sample`, and they are
disabled by default. Deleting them should be a no-op, and makes the
cache a bit smaller.
https://github.com/rubygems/rubygems/commit/d2149999cd
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11574
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11573
|
|
https://github.com/rubygems/rubygems/commit/511c7b211b
|
|
https://github.com/rubygems/rubygems/commit/032b3c518a
|
|
https://github.com/rubygems/rubygems/commit/5887e6dfa1
|
|
|
|
|
|
https://github.com/ruby/psych/commit/a8b73bb80e
|
|
https://github.com/ruby/psych/commit/3b63a93dfc
|
|
https://github.com/ruby/psych/commit/9f5392d180
|
|
https://github.com/ruby/psych/commit/ce7946981d
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11553
|
|
* This PR from the timeout gem (https://github.com/ruby/timeout/pull/30) made it so you have to handle_interrupt on Timeout::ExitException instead of Timeout::Error
* Efficiency changes to the gem (one shared thread) mean you can't consistently handle timeout errors using handle_timeout: https://github.com/ruby/timeout/issues/41
Notes:
Merged: https://github.com/ruby/ruby/pull/11474
|
|
`Process.clock_gettime` only works since 2.1
https://github.com/ruby/benchmark/commit/94cfe56291
|
|
|
|
|
|
Since universal-parser and prism support, prelude code used functions
inaccessible from outside libruby shared library.
```
linking goruby
/usr/bin/ld: goruby.o: in function `prelude_eval':
/home/runner/work/ruby/ruby/build/golf_prelude.c:221: undefined reference to `rb_ruby_prism_ptr'
/usr/bin/ld: goruby.o: in function `pm_prelude_load':
/home/runner/work/ruby/ruby/build/golf_prelude.c:192: undefined reference to `pm_options_line_set'
/usr/bin/ld: /home/runner/work/ruby/ruby/build/golf_prelude.c:193: undefined reference to `pm_parse_string'
/usr/bin/ld: goruby.o: in function `prelude_eval':
/home/runner/work/ruby/ruby/build/golf_prelude.c:224: undefined reference to `pm_iseq_new_with_opt'
/usr/bin/ld: /home/runner/work/ruby/ruby/build/golf_prelude.c:226: undefined reference to `pm_parse_result_free'
/usr/bin/ld: goruby.o: in function `prelude_ast_value':
/home/runner/work/ruby/ruby/build/golf_prelude.c:181: undefined reference to `rb_ruby_ast_data_get'
/usr/bin/ld: goruby.o: in function `prelude_eval':
/home/runner/work/ruby/ruby/build/golf_prelude.c:231: undefined reference to `rb_ruby_ast_data_get'
/usr/bin/ld: goruby.o: in function `pm_prelude_load':
/home/runner/work/ruby/ruby/build/golf_prelude.c:196: undefined reference to `pm_parse_result_free'
collect2: error: ld returned 1 exit status
```
|
|
Refactor out the same code from `rb_builtin_ast_value` and
`pm_builtin_ast_value.
|
|
|
|
|
|
validation
Added `inspect` to the `request_specific_fields` value to provide
better visibility for users in the exception message.
https://github.com/ruby/open-uri/commit/f89ce5112d
|
|
https://github.com/ruby/open-uri/commit/2e7734c061
|
|
https://github.com/ruby/open-uri/commit/060886f312
|
|
This commit introduces the `request_specific_fields` option in OpenURI.
It provides two methods for customizing headers as follows.
1. Specify headers only for the initial request
Use a Hash to apply headers only to the first request.
These headers are automatically removed during redirects.
2. Specify headers dynamically for each request
Use a Proc to dynamically generate headers for each request,
including during redirects, based on the request URL.
This feature allows users to control headers flexibly,
ensuring that sensitive headers like "Authorization" are not unintentionally
transferred during redirects unless explicitly specified.
https://github.com/ruby/open-uri/commit/460f858e3c
|
|
(https://github.com/ruby/rdoc/pull/1175)
https://github.com/ruby/rdoc/commit/964a1982c8
|
|
This PR fixes a token incompatibility between Parser gem and `Prism::Translation::Parser` for left parenthesis.
## Parser gem (Expected)
Returns `tLPAREN2` token:
```console
$ bundle exec ruby -Ilib -rparser/ruby33 \
-ve 'buf = Parser::Source::Buffer.new("example.rb"); buf.source = "foo(:bar)"; p Parser::Ruby33.new.tokenize(buf)[2]'
ruby 3.4.0dev (2024-09-01T11:00:13Z master https://github.com/ruby/prism/commit/eb144ef91e) [x86_64-darwin23]
[[:tIDENTIFIER, ["foo", #<Parser::Source::Range example.rb 0...3>]], [:tLPAREN2, ["(", #<Parser::Source::Range example.rb 3...4>]],
[:tSYMBOL, ["bar", #<Parser::Source::Range example.rb 4...8>]], [:tRPAREN, [")", #<Parser::Source::Range example.rb 8...9>]]]
```
## `Prism::Translation::Parser` (Actual)
Previously, the parser returned `tLPAREN` token when parsing the following:
```console
$ bundle exec ruby -Ilib -rprism -rprism/translation/parser33 -ve \
'buf = Parser::Source::Buffer.new("example.rb"); buf.source = "foo(:bar)"; p Prism::Translation::Parser33.new.tokenize(buf)[2]'
ruby 3.4.0dev (2024-09-01T11:00:13Z master https://github.com/ruby/prism/commit/eb144ef91e) [x86_64-darwin23]
[[:tIDENTIFIER, ["foo", #<Parser::Source::Range example.rb 0...3>]], [:tLPAREN, ["(", #<Parser::Source::Range example.rb 3...4>]],
[:tSYMBOL, ["bar", #<Parser::Source::Range example.rb 4...8>]], [:tRPAREN, [")", #<Parser::Source::Range example.rb 8...9>]]]
```
After the update, the parser now returns `tLPAREN2` token for the same input:
```console
$ bundle exec ruby -Ilib -rprism -rprism/translation/parser33 -ve \
'buf = Parser::Source::Buffer.new("example.rb"); buf.source = "foo(:bar)"; p Prism::Translation::Parser33.new.tokenize(buf)[2]'
ruby 3.4.0dev (2024-09-01T11:00:13Z master https://github.com/ruby/prism/commit/eb144ef91e) [x86_64-darwin23]
[[:tIDENTIFIER, ["foo", #<Parser::Source::Range example.rb 0...3>]], [:tLPAREN2, ["(", #<Parser::Source::Range example.rb 3...4>]],
[:tSYMBOL, ["bar", #<Parser::Source::Range example.rb 4...8>]], [:tRPAREN, [")", #<Parser::Source::Range example.rb 8...9>]]]
```
The `PARENTHESIS_LEFT` token in Prism is classified as either `tLPAREN` or `tLPAREN2` in the Parser gem.
The tokens that were previously all classified as `tLPAREN` are now also classified to `tLPAREN2`.
With this change, the following code could be removed from `test/prism/ruby/parser_test.rb`:
```diff
- when :tLPAREN
- actual_token[0] = expected_token[0] if expected_token[0] == :tLPAREN2
```
https://github.com/ruby/prism/commit/04d6f3478d
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11564
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11564
|
|
Allow objects that are not of type `RTypedData` to use the default
free function, as `RTYPEDDATA_EMBEDDED_P` can return a false positive
when casting non-`RTypedData` objects.
Notes:
Merged: https://github.com/ruby/ruby/pull/11563
Merged-By: nobu <[email protected]>
|
|
(https://github.com/ruby/rdoc/pull/1173)
https://github.com/ruby/rdoc/commit/6a9cad4c54
|
|
Libunwind as packaged in MacOS cannot actually unwind code which has
pointer authentication on, because _LIBUNWIND_IS_NATIVE_ONLY is not
defined. Add a check for this, and prefer building with working
unwinding over pointer authentication if we must make a choice.
Notes:
Merged: https://github.com/ruby/ruby/pull/11548
|
|
This reverts commit 6a746e1bc902d4245aac58db4e9ffc2f72d79629.
This patch breaks the C level backtrace on macOS ARM machines.
Notes:
Merged: https://github.com/ruby/ruby/pull/11548
|
|
https://github.com/rubygems/rubygems/commit/732679306d
|
|
Every time a gem is not found in the Compact Index API, RubyGems will
fallback to the full index, which is very slow. This is unnecessary
because both indexes should be providing the same gems, so if a gem
can't be found in the Compact Index API, it won't be found in the full
index.
We _do_ want a fallback to the full index, whenever the Compact Index
API is not implemented. To detect that, we check that the API responds
to the "/versions" endpoint, just like Bundler does.
Before:
```
$ time gem install fooasdsfafs
ERROR: Could not find a valid gem 'fooasdsfafs' (>= 0) in any repository
gem 20,77s user 0,59s system 96% cpu 22,017 total
```
After:
```
$ time gem install fooasdsfafs
ERROR: Could not find a valid gem 'fooasdsfafs' (>= 0) in any repository
gem 5,02s user 0,09s system 91% cpu 5,568 total
```
https://github.com/rubygems/rubygems/commit/c0d6b9eea7
|
|
https://github.com/rubygems/rubygems/commit/282dbb3d62
|