Граф коммитов

17467 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada bab01d284c [Feature #19790] Rename BUGREPORT_PATH as CRASH_REPORT 2023-09-25 22:57:28 +09:00
Nobuyoshi Nakada 7e2775b057 Invoke the command when RUBY_BUGREPORT_PATH starts with `|` 2023-09-25 22:57:28 +09:00
Nobuyoshi Nakada 89b3c111ff Redirect to RUBY_BUGREPORT_PATH file 2023-09-25 22:57:28 +09:00
Nobuyoshi Nakada 94d7c70801
Fix test thread leakage 2023-09-24 09:50:01 +09:00
Adam Hess c42261059d [Bug #19901]
fix leak in module clone

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2023-09-23 23:10:46 +02:00
Peter Zhu 61a2e9450c Fix memory leak in Hash#rehash for ST hashes
We need to free the old ST table in Hash#rehash.

Co-authored-by: Adam Hess <adamhess1991@gmail.com>
2023-09-23 11:24:41 -04:00
Haldun Bayhantopcu 6de1a9238b [ruby/yarp] Check class name to be a constant path node or a constant read node
https://github.com/ruby/yarp/commit/fd7c44f13f
2023-09-22 17:08:04 +00:00
Jemma Issroff 9abaf392b1
Resync yarp (#8498)
* [YARP] Reject numbered parameters in block parameters

* [YARP] Do not allow BEGIN except the toplevel

---------

Co-authored-by: Haldun Bayhantopcu <haldun@github.com>
2023-09-22 12:05:47 -04:00
Haldun Bayhantopcu c54e225f34 [ruby/yarp] Introduce YP_TOKEN_METHOD_NAME
https://github.com/ruby/yarp/commit/e855bf415c
2023-09-22 15:47:56 +00:00
Nobuyoshi Nakada ea5f8e123c
Magical wait to get rid of deadlock on macOS 2023-09-22 23:45:54 +09:00
Kevin Newton a5ae5f71fd [ruby/yarp] Fix listener leave event order
https://github.com/ruby/yarp/commit/1e6e264836
2023-09-22 14:07:48 +00:00
Adam Hess 8b236e0c66 [Bug #19896]
fix memory leak in vm_method

This introduces a unified reference_count to clarify who is referencing a method.
This also allows us to treat the refinement method as the def owner since it counts itself as a reference

Co-authored-by: Peter Zhu <peter@peterzhu.ca>
2023-09-22 09:44:58 -04:00
Stan Lo f59b488b5a [ruby/irb] Page show_source's output
(https://github.com/ruby/irb/pull/719)

https://github.com/ruby/irb/commit/3cedc5cb62
2023-09-22 13:00:32 +00:00
Nobuyoshi Nakada c8c35ded74
[YARP] Suppress constant redefinition warning
```
<compiled>:1: warning: already initialized constant Bar
test/yarp/compiler_test.rb:139: warning: previous definition of Bar was here
```
2023-09-22 19:41:52 +09:00
Benoit Daloze 50e3b27db7 [ruby/zlib] Add truffleruby-head in CI
* The latest release does not have this fix:
  c77f8bb35d

https://github.com/ruby/zlib/commit/8abc80b994
2023-09-22 07:29:22 +00:00
Matt Valentine-House bf129370d3 [YARP] Implement ConstantPathTargetNode
Co-Authored-By: kddnewton <kevin.newton@shopify.com>
2023-09-21 23:00:49 +01:00
Jemma Issroff a7b3217fff
[YARP] Add tests for popped instructions (#8494) 2023-09-21 15:28:08 -04:00
Samuel Giddins 39a6272cf4 [rubygems/rubygems] Fix safe marshal test on jruby
Allow for variance in order of dumped ivars, fix by setting the disallowed ivar on an object that will have no other ivars so the index is consistent

https://github.com/rubygems/rubygems/commit/ccb8f42753
2023-09-21 19:08:11 +00:00
Samuel Giddins 812c8196b6 [rubygems/rubygems] Remove usage of Dir.chdir that just execute a subprocess
Preferring instead to spawn the subprocess in the correct directory

https://github.com/rubygems/rubygems/commit/ad5abd6a45
2023-09-21 18:30:37 +00:00
Samuel Giddins 02fa2acbde [rubygems/rubygems] Freeze more strings in generated gemspecs
Specifically, this will have frozen string literals for:
- Gem platform tuple entries
- Gem::Version strings
- Gem::Specification#installed_by_version
- Dependency requirement strings

https://github.com/rubygems/rubygems/commit/6195da5bdb
2023-09-21 18:25:04 +00:00
Jun Aruga 7f407e0240 [ruby/openssl] Fix test_pkey_ec.rb on FIPS.
https://github.com/ruby/openssl/commit/d07183f639
2023-09-21 18:04:56 +00:00
Jun Aruga f370c4dc03 [ruby/openssl] test_pkey.rb: Refactor the test_ed25519 on FIPS.
* Split the test in the FIPS case as another test.
* test/openssl/utils.rb: Add omit_on_fips and omit_on_non_fips methods.

https://github.com/ruby/openssl/commit/4d64c38ed0
2023-09-21 18:04:55 +00:00
Jun Aruga 3123b2fa0e [ruby/openssl] test_fips.rb: Fix the `OpenSSL.fips_mode` affecting other tests.
Run the test with `assert_separately` for the `false` value of the
`OpenSSL.fips_mode` not to affect other tests.

https://github.com/ruby/openssl/commit/2fe3438d8a
2023-09-21 18:04:55 +00:00
Samuel Giddins 0a423d4c4e [rubygems/rubygems] Aggressively optimize allocations in SafeMarshal
Reduces allocations in a bundle install --full-index by an order of magnitude

Main wins are (a) getting rid of exessive string allocations for exception message stack

(b) Avoiding hash allocations caused by kwargs for #initialize

(c) avoid using unpack to do bit math, its easy enough to do by hand

(d) special case the most common elements so they can be read without an allocation

(e) avoid string allocations every time a symbol->string lookup is done by using symbol#name

https://github.com/rubygems/rubygems/commit/7d2ee51402
2023-09-21 07:40:58 +00:00
Kouhei Yanagita 7e350f5310 Optimize Range#bsearch for beginless/endless ranges within Fixnum 2023-09-21 10:30:58 +09:00
Nobuyoshi Nakada ab637cad2b [Bug #19624] Clean up backquote IO
It should not be hidden, since it can be grabbed by a fiber scheduler.
2023-09-21 10:23:14 +09:00
Jemma Issroff d6abca459f [ruby/yarp] Print locations using line / col instead of offsets
This commit changes printing of locations to use the format
(start_line,start_column)-(end_line,end_column) instead of using
offsets.

https://github.com/ruby/yarp/commit/c078696e22
2023-09-20 18:30:34 +00:00
Haldun Bayhantopcu 0a630fa461 [ruby/yarp] Check whether the conditional predicate is closed
https://github.com/ruby/yarp/commit/5022b51db2
2023-09-20 17:50:32 +00:00
Peter Zhu 96c5a4be7b Fix memory leak in complemented method entries
[Bug #19894]

When a copy of a complemented method entry is created, there are two
issues:

1. IMEMO_FL_USER3 is not copied, so the complemented status is not
   copied over.
2. In rb_method_entry_clone we increment both alias_count and
   complemented_count. However, when we free the method entry in
   rb_method_definition_release, we only decrement one of the two
   counters, resulting in the rb_method_definition_t being leaked.

Co-authored-by: Adam Hess <adamhess1991@gmail.com>
2023-09-20 10:19:24 -04:00
Samuel Giddins 843c83ee5f [rubygems/rubygems] Give up, load Time via Marshal.load
https://github.com/rubygems/rubygems/commit/6c92ba2ba3
2023-09-20 02:03:04 +00:00
Samuel Giddins f4a5fac0d2 [rubygems/rubygems] Ruby 2.6 compat
https://github.com/rubygems/rubygems/commit/1a84960af3
2023-09-20 02:03:04 +00:00
Samuel Giddins cadca9f67e [rubygems/rubygems] All rubies working with different time zones
Tested with:

`ruby -e 'trap("INT") { exit 1 }; TZ=%w[UTC +0000 -0000]; RUBY=%w[ruby-2.7 ruby-3.2.2 jruby-9.4 truffleruby-22 truffleruby-23]; TZ.product(RUBY).each { |t, r| puts ?**120, "TZ=#{t} RUBY=#{r}", "*"*120; system({"TZ"=>t,"RUBY"=>r}, *ARGV) }' zsh -lic 'chruby $RUBY; ruby -vw -Ilib test/rubygems/test_gem_safe_marshal.rb --verbose=progress'`

https://github.com/rubygems/rubygems/commit/6192005afb
2023-09-20 02:03:03 +00:00
Samuel Giddins c65c88e65c [rubygems/rubygems] Tests passing on truffleruby 22 in addition to 23
https://github.com/rubygems/rubygems/commit/8065530d43
2023-09-20 02:03:03 +00:00
Samuel Giddins d3628e6ac4 [rubygems/rubygems] safe_load tests passing on jruby & truffleruby
https://github.com/rubygems/rubygems/commit/a64b21b052
2023-09-20 02:03:02 +00:00
Samuel Giddins 1fff3e44ff [rubygems/rubygems] Verified working on mri/jruby/truffleruby with specs on rubygems.org
https://github.com/rubygems/rubygems/commit/4f51741cc6
2023-09-20 02:03:00 +00:00
Samuel Giddins cdcc760dc0 [rubygems/rubygems] Broader version compatibility in marshal tests
https://github.com/rubygems/rubygems/commit/6ec518c563
2023-09-20 02:02:59 +00:00
Samuel Giddins c80a4d453a [rubygems/rubygems] Fix UTC time loading
https://github.com/rubygems/rubygems/commit/2a4d0a44b0
2023-09-20 02:02:58 +00:00
Samuel Giddins d182d83ce9 [rubygems/rubygems] Add a Marshal.load replacement that walks an AST to safely load permitted classes/symbols
https://github.com/rubygems/rubygems/commit/7e4478fe73
2023-09-20 02:02:58 +00:00
Matt Valentine-House 7dee7e6116 [YARP] Implement GlobalVariableTargetNode 2023-09-19 19:52:32 +01:00
Benoit Daloze 3fadb66bf1 [ruby/yarp] Only use Ripper on CRuby
https://github.com/ruby/yarp/commit/9c23f53d7b
2023-09-19 17:20:15 +00:00
Jemma Issroff a71001d341 [ruby/yarp] Ignore parseing specific files on TruffleRuby to make CI green
CI is currently failing due to an issue with Ripper on the latest
TruffleRuby version. This commit removes the offending tests from
running, to ensure CI is green again.

https://github.com/ruby/yarp/commit/dae2c80c42
2023-09-19 16:43:24 +00:00
Mike Dalessio 0cda3ac454 [ruby/yarp] fix: handling escaped whitespace in a %w list
Introduces a new flavor of unescaping, YP_UNESCAPE_WHITESPACE, which
is the same as MINIMAL but also unescapes whitespace.

Note that a spanning_heredoc.txt fixture test is updated to be less
wrong, but YARP's behavior doesn't yet fully match Ruby in this case.

Fixes https://github.com/ruby/yarp/pull/1505

https://github.com/ruby/yarp/commit/0af69bdeb1
2023-09-19 16:14:31 +00:00
Kevin Newton 2531ba4ba0 [ruby/yarp] Consistently place block arguments on block slot for call
https://github.com/ruby/yarp/commit/fe208302e5
2023-09-19 16:13:08 +00:00
Matt Valentine-House 5c5391f444 [YARP] Implement ClassVariableTargetNode 2023-09-19 14:54:15 +01:00
Matt Valentine-House 2f8daa5f51 [YARP] Implement InstanceVariableTargetNode, LocalVariableTargetNode 2023-09-19 14:53:58 +01:00
Matt Valentine-House 91b10c0b77 [YARP] Implement ConstantTargetNode 2023-09-19 14:53:39 +01:00
Hiroshi SHIBATA b33e9f637d [ruby/securerandom] Removed extra argument for build failure of ruby/ruby
https://github.com/ruby/ruby/actions/runs/6230184763/job/16909829150

https://github.com/ruby/securerandom/commit/f60582432c
2023-09-19 02:22:15 +00:00
nick evans dfb2b4cbc9 [ruby/securerandom] Add support for UUID version 7
Although the specification for UUIDv7 is still in draft, the UUIDv7
algorithm has been relatively stable as it progresses to completion.

Version 7 UUIDs can be very useful, because they are lexographically
sortable, which can improve e.g: database index locality.  See section
6.10 of the draft specification for further explanation:

  https://datatracker.ietf.org/doc/draft-ietf-uuidrev-rfc4122bis/

The specification allows up to 12 bits of extra timestamp precision, to
make UUID generation closer to monotonically increasing.  This provides
between 1ms and ~240ns of timestamp precision.  At the cost of some code
complexity and a small performance penalty, a kwarg may specify any
arbitrary precision between 0 and 12 extra bits.  Any stronger
guarantees of monotonicity have considerably larger tradeoffs, so
nothing more is implemented.  This limitation is documented.

Ruby issue: https://bugs.ruby-lang.org/issues/19735

https://github.com/ruby/securerandom/commit/34ed1a2ec3
2023-09-19 01:55:27 +00:00
Kevin Newton 1636f6abd6 [ruby/yarp] Use compact_child_nodes where possible
https://github.com/ruby/yarp/commit/c1911fa9b1
2023-09-18 17:48:52 +00:00
Jemma Issroff 54e676a88b
[YARP] Restructure tests to compare YARP evaluation to CRuby evaluation (#8467)
Previously, we were hardcoding the expected evaluation value. Now,
instead, we structure it so that we compare the YARP evaluation value
against CRuby's evaluation value.
2023-09-18 12:34:20 -04:00