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

11837 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA 7477284043
Hide Gem::MockGemUi. It's only used by tests 2023-04-19 15:59:59 +09:00
Hiroshi SHIBATA d1c42da7a1 [rubygems/rubygems] To use Gem::YAMLSerializer in Bundler
https://github.com/rubygems/rubygems/commit/5351e01b32
2023-04-19 06:56:24 +00:00
Hiroshi SHIBATA 40d1a00040 [rubygems/rubygems] Copy YAMLSerializer from Bundler
https://github.com/rubygems/rubygems/commit/6a97346708
2023-04-19 06:56:23 +00:00
Hiroshi SHIBATA 8b95b33a9d [rubygems/rubygems] Bundler::YAMLSerializer.load couldn't raise error when invalid yaml was provided
https://github.com/rubygems/rubygems/commit/cfcfde04c7
2023-04-19 06:56:22 +00:00
Hiroshi SHIBATA ef54a9aeb6 [rubygems/rubygems] Introduce self.load_with_rubygems_config_hash
https://github.com/rubygems/rubygems/commit/9175b8cf2a
2023-04-19 06:56:21 +00:00
Hiroshi SHIBATA 644d7df021 [rubygems/rubygems] Introduce self.dump_with_rubygems_yaml
https://github.com/rubygems/rubygems/commit/3d3b0d80a1
2023-04-19 06:56:21 +00:00
Hiroshi SHIBATA 45655089da [rubygems/rubygems] Removed trailing-slash for domain
https://github.com/rubygems/rubygems/commit/81ba58f445
2023-04-19 06:56:20 +00:00
Hiroshi SHIBATA cdc2e3de10 [rubygems/rubygems] Wrap self.convert_rubygems_config_hash from Bundler::YAMLSerializer.load
https://github.com/rubygems/rubygems/commit/080880ac23
2023-04-19 06:56:20 +00:00
Hiroshi SHIBATA 7b959f6288 [rubygems/rubygems] Move all changes only in RubyGems
https://github.com/rubygems/rubygems/commit/d842e2092f
2023-04-19 06:56:20 +00:00
Hiroshi SHIBATA 30b3290f26 [rubygems/rubygems] Added guard condition for replacing __ variable in YAML keys
https://github.com/rubygems/rubygems/commit/e7d31405ea
2023-04-19 06:56:19 +00:00
Hiroshi SHIBATA bf8d8ce1ee [rubygems/rubygems] Keep compatiblity of Bundler specs
https://github.com/rubygems/rubygems/commit/b211eeacba
2023-04-19 06:56:18 +00:00
Hiroshi SHIBATA 364c2fea34 [rubygems/rubygems] Replaced empty hash to nil value in YAML
https://github.com/rubygems/rubygems/commit/8771fbf53d
2023-04-19 06:56:17 +00:00
Hiroshi SHIBATA 7e537e9613 [rubygems/rubygems] Only convert old URL key name when it's contained double underscore
https://github.com/rubygems/rubygems/commit/a4bfa2ef94
2023-04-19 06:56:17 +00:00
Hiroshi SHIBATA e684eb9e61 [rubygems/rubygems] Added missing require for Bundler::YAMLSerializer
https://github.com/rubygems/rubygems/commit/55ef32fdd7
2023-04-19 06:56:16 +00:00
Hiroshi SHIBATA 9365492f63 [rubygems/rubygems] Fix regexp for Symbol
https://github.com/rubygems/rubygems/commit/9a3ed682a0
2023-04-19 06:56:16 +00:00
Hiroshi SHIBATA 1225eff38f [rubygems/rubygems] Don't use Psych
https://github.com/rubygems/rubygems/commit/d6555aaa28
2023-04-19 06:56:15 +00:00
Hiroshi SHIBATA 038c6e773f [rubygems/rubygems] Added explicitly loading for Gem::SafeYAML
https://github.com/rubygems/rubygems/commit/3d9d587dd7
2023-04-19 06:56:15 +00:00
Hiroshi SHIBATA 2c91ec0869 [rubygems/rubygems] We need to convert empty string for nil value
https://github.com/rubygems/rubygems/commit/348c82311f
2023-04-19 06:56:15 +00:00
Hiroshi SHIBATA fd981ebf4c [rubygems/rubygems] Handle Symbol value
https://github.com/rubygems/rubygems/commit/c98677d073
2023-04-19 06:56:14 +00:00
Hiroshi SHIBATA 2014dc5e3a [rubygems/rubygems] Handle Symbol key and Interger and Boolean values
https://github.com/rubygems/rubygems/commit/63efdac045
2023-04-19 06:56:14 +00:00
Hiroshi SHIBATA 6f50ecfe66 [rubygems/rubygems] Try to use pure-ruby YAML serializer for configuration
https://github.com/rubygems/rubygems/commit/3268d40974
2023-04-19 06:56:13 +00:00
Aaron Patterson bdffcd6df3 Update RJIT to support newarray_send
This also adds max / hash support
2023-04-18 17:16:22 -07:00
tomoya ishida 19aa30d5d5 [ruby/reline] Change Reline.add_dialog_proc(name, nil) to properly
remove dialog_proc
(https://github.com/ruby/reline/pull/532)

https://github.com/ruby/reline/commit/43283b2f37
2023-04-15 09:32:05 +00:00
Hiroshi SHIBATA 6beb755d81 [ruby/prettyprint] Expose PrettyPrint::VERSION
https://github.com/ruby/prettyprint/commit/c6f3947e96
2023-04-14 01:52:08 +00:00
Hiroshi SHIBATA 3f8756484f [ruby/pp] Expose PP::VERSION
https://github.com/ruby/pp/commit/3d0e65e79f
2023-04-14 01:49:51 +00:00
Hiroshi SHIBATA 652f273308 [ruby/resolv] Expose Resolv::VERSION
https://github.com/ruby/resolv/commit/6ab2385e89
2023-04-14 01:46:38 +00:00
Hiroshi SHIBATA ebe620def6 [ruby/securerandom] Expose SecureRandom::VERSION
https://github.com/ruby/securerandom/commit/2e6434331d
2023-04-14 01:43:47 +00:00
卜部昌平 64e503eb62 avoid seeding
OpenSSL's man page previously stated that "the application is
responsible for seeding the PRNG by calling RAND_add" (see [1]).
So we had this code.  However things changed.  They no longer
say so, instead "manual (re-)seeding of the default OpenSSL
random generator is not necessary" now (see [2]).  It seems all
OpenSSL versions that we support now already behaves like this.
Let's follow that.

[1]: https://www.openssl.org/docs/man1.0.2/man3/RAND_add.html
[2]: https://www.openssl.org/docs/manmaster/man3/RAND_add.html
2023-04-13 19:50:00 +09:00
Hiroshi SHIBATA f09638fe25 [ruby/time] Expose Time::VERSION
https://github.com/ruby/time/commit/32793b56b7
2023-04-13 18:51:18 +09:00
Hiroshi SHIBATA cf77f7b5e7 [ruby/time] Bump version to 0.2.2
https://github.com/ruby/time/commit/5f080cf700
2023-04-13 18:51:18 +09:00
Hiroshi SHIBATA 8b924ebdf2 [ruby/tempfile] Expose Tempfile::VERSION
https://github.com/ruby/tempfile/commit/6aa1f37dc4
2023-04-13 09:49:14 +00:00
Hiroshi SHIBATA 84d11498c2 [ruby/shellwords] Expose Shellwords::VERSION
https://github.com/ruby/shellwords/commit/e38b8b026a
2023-04-13 09:48:55 +00:00
Hiroshi SHIBATA 61bd69470a [ruby/open-uri] Expose OpenURI::VERSION
https://github.com/ruby/open-uri/commit/666768d960
2023-04-13 09:47:40 +00:00
Hiroshi SHIBATA 76aaaf6434 [ruby/un] Expose UN::VERSION
https://github.com/ruby/un/commit/47bcad1804
2023-04-13 09:47:22 +00:00
John Hawthorn be08e1b14c RJIT: argc check in known cfuncs 2023-04-12 17:48:34 -07:00
Marcin Rozmus c8d8207aea [rubygems/rubygems] Fix broken hyperlinks in bundle cache documentation
https://github.com/rubygems/rubygems/commit/1ff3e7450a
2023-04-12 20:27:39 +00:00
Ashley Ellis Pierce 851344965a
Ensure api_key is sent if basic auth not provided on webauthn_verification_url
Co-authored-by: Jenny Shen <jenny.shen@shopify.com>
2023-04-12 12:00:25 +09:00
Eric Herscovich 1b1485ae4d
Add message for otp bypass
Update tests

Fix wording of message
2023-04-12 11:59:18 +09:00
Jenny Shen b909ca94bd
Terminate interaction after wait for otp thread completes to support jruby 2023-04-12 11:58:03 +09:00
Jenny Shen c7a8d63df8
Terminate interaction when rescuing WebauthnVerificationError during wait_for_otp
Co-authored-by: Betty Li <makewithbetty@gmail.com>
2023-04-12 11:57:43 +09:00
Jenny Shen cd60113faa
Use Webauthn Listener in wait_for_otp 2023-04-12 11:57:15 +09:00
Jenny Shen b6e860ba1b
Add wait for webauthn otp when fetching otp
Co-authored-by: Jacques Chester <jacques.chester@shopify.com>
2023-04-12 11:57:11 +09:00
Ashley Ellis Pierce 774d1f1a00
Merge lines 2023-04-12 11:56:33 +09:00
Jenny Shen 096f6eec3e [rubygems/rubygems] Refactor Webauthn listener response - Makes the response class a wrapper around Net::HTTPResponse - Builds a Net::HTTPResponse upon initialization - to_s returns a string representation of the response to send - Adds a Socket Responder class to send responses given a socket
https://github.com/rubygems/rubygems/commit/7513c220b6

Co-authored-by: Jacques Chester <jacques.chester@shopify.com>
2023-04-12 11:51:07 +09:00
Jenny Shen ef85b6de42 [rubygems/rubygems] Add access control headers for all requests to allow RubyGems.org to render the response
https://github.com/rubygems/rubygems/commit/22b329eb60
2023-04-12 11:51:06 +09:00
Jenny Shen 353f9adccc [rubygems/rubygems] Add otp command tests
https://github.com/rubygems/rubygems/commit/c494112063
2023-04-12 11:51:05 +09:00
Jenny Shen 6e7bf0677d [rubygems/rubygems] Add WebauthnListener class
https://github.com/rubygems/rubygems/commit/d42ddbb73c

Co-authored-by: Ashley Ellis Pierce <anellis12@gmail.com>
Co-authored-by: Jacques Chester <jacques.chester@shopify.com>
2023-04-12 11:51:04 +09:00
Jenny Shen 354a5c646e [rubygems/rubygems] Add WebauthnVerificationError Exception
https://github.com/rubygems/rubygems/commit/932c111f2c
2023-04-12 11:51:03 +09:00
Jenny Shen 332c4b6726 [rubygems/rubygems] Add WebauthnListener response classes
https://github.com/rubygems/rubygems/commit/0e9a26acb1
2023-04-12 11:51:03 +09:00
Ashley Ellis Pierce ea95ec5443 [rubygems/rubygems] Clarify message
https://github.com/rubygems/rubygems/commit/d94173be49
2023-04-12 11:51:02 +09:00
Ashley Ellis Pierce 6275284f02 [rubygems/rubygems] Ask user to otp at webauthn verification url
https://github.com/rubygems/rubygems/commit/004eadb0c5
2023-04-12 11:51:01 +09:00
Hiroshi SHIBATA d89cc317c6
util/rubocop -A --only Style/NumericLiteralPrefix 2023-04-11 19:12:28 +09:00
ima1zumi f7c8d3bf96 [ruby/irb] Bump version to 1.6.4
(https://github.com/ruby/irb/pull/560)

https://github.com/ruby/irb/commit/01328da9b6
2023-04-09 13:44:12 +00:00
Kasumi Hanazuki 957595f218 [ruby/resolv] Do not compress domain name in SRV RDATA
[RFC2782] prohibits use of name compression for the target host name
in the RDATA of a SRV record.

[RFC2782]: https://datatracker.ietf.org/doc/rfc2782/

Closes: https://github.com/ruby/resolv/issues/29

https://github.com/ruby/resolv/commit/ac85724e17
2023-04-08 14:16:59 +00:00
Stan Lo e7f77e1e89 [ruby/irb] Simplify command method definition
(https://github.com/ruby/irb/pull/559)

* Remove unnecessary command argument generation code

Now that all the supported Ruby versions handle splat args and splat kwargs,
we don't need that args generation code anymore.

* Remove unused command definition code

If we look at `@EXTEND_COMMANDS`, all commands are defined in a file, which
means the `if load_file` branch is always executed. Therefore we can drop
the else branch of that condition.

* Avoid defining unnecessary command methods

There's no need to define another command method just to call `Command.execute`.
2023-04-08 10:11:50 +00:00
David Rodríguez 4df7c3946a [rubygems/rubygems] Remove one fallback to full indexes on big gemfiles
If Gemfile has a lot of dependencies, we have an optimization that uses
the full index in that case, assuming it's going to be faster.

I think this is an old optimization that predates compact index API
times, I believe we no longer need it these days.

Also, since a few releases ago we check for circular dependencies when
resolving by looping through all versions of each name and removing
those that have circular dependencies that would trip up the resolver.

This loop becomes actually very slow when full indexes are used because
to find dependencies of a gemspec, we need to explicitly fetch the
marshaled gemspec (`gemspec.rz` endpoint) for it, so the optimization
has the opposite effect of making things very slow.

https://github.com/rubygems/rubygems/commit/2f46289bd3
2023-04-07 13:53:00 +00:00
Hiroshi SHIBATA 250e97c0fb [rubygems/rubygems] util/rubocop -A --only Style/FormatString
https://github.com/rubygems/rubygems/commit/132a56569d
2023-04-07 05:13:05 +00:00
Hiroshi SHIBATA fb822076d7 [rubygems/rubygems] util/rubocop -A --only Style/LineEndConcatenation
https://github.com/rubygems/rubygems/commit/67ece7b8b6
2023-04-06 23:33:20 +00:00
Hiroshi SHIBATA 70371aa071
Revert accidentally commit of wrong file
Revert "[ruby/syntax_suggest] Remove unnecessary `--color` option"

  This reverts commit 588dd44d41.
2023-04-06 16:30:00 +09:00
schneems 7ab640d9dd
v1.0.4 2023-04-06 15:49:26 +09:00
schneems 8d72d6159c
v1.0.3
Fix a CI error and add a test to ensure we're testing the current version:

```
Run bundle exec rake test
bundler: failed to load command: rake (/home/runner/work/syntax_suggest/syntax_suggest/vendor/bundle/ruby/3.2.0/bin/rake)
/opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/runtime.rb:309:in `check_for_activated_spec!': You have already activated syntax_suggest 1.0.2, but your Gemfile requires syntax_suggest 1.0.3. Since syntax_suggest is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports syntax_suggest as a default gem. (Gem::LoadError)
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/runtime.rb:25:in `block in setup'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/spec_set.rb:138:in `each'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/spec_set.rb:138:in `each'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/runtime.rb:24:in `map'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/runtime.rb:24:in `setup'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler.rb:151:in `setup'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/setup.rb:20:in `block in <top (required)>'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/ui/shell.rb:136:in `with_level'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/ui/shell.rb:88:in `silence'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/setup.rb:20:in `<top (required)>'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/cli/exec.rb:56:in `require_relative'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/cli/exec.rb:56:in `kernel_load'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/cli/exec.rb:23:in `run'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/cli.rb:483:in `exec'
	from /opt/hostedtoolcache/Ruby/3.2.1/x64/lib/ruby/gems/3.2.0/gems/bundler-2.3.14/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
```
2023-04-06 15:47:04 +09:00
Yusuke Endoh d511e6960f [ruby/syntax_suggest] The annotation must end with a new line
syntax_suggest did not work great when there is no new line at the end
of the input file.

Input:
```
def foo
end
end # No newline at end of file
```

Previous output:
```
$ ruby test.rb
test.rb: --> test.rb
Unmatched `end', missing keyword (`do', `def`, `if`, etc.) ?
> 1  def foo
> 2  end
> 3  end # No newline at end of filetest.rb:3: syntax error, unexpected `end' (SyntaxError)
end # No newline at end of file
^~~
```

Note that "test.rb:3: ..." is appended to the last line of the
annotation.

This change makes sure that the annotation ends with a new line.

New output:
```
$ ruby test.rb
test.rb: --> test.rb
Unmatched `end', missing keyword (`do', `def`, `if`, etc.) ?
> 1  def foo
> 2  end
> 3  end # No newline at end of file
test.rb:3: syntax error, unexpected `end' (SyntaxError)
end # No newline at end of file
^~~
```

https://github.com/ruby/syntax_suggest/commit/db4cf9147d
2023-04-06 15:45:30 +09:00
schneems 63ea6b0cf2 [ruby/syntax_suggest] Rollback comment indentation behavior
Originally I fixed https://github.com/ruby/syntax_suggest/pull/177 by making the process of comment removal indentation aware. The next commit is the more general fix and means we don't need to carry that additional logic/overhead.

Also: Update syntax via linter
2023-04-06 15:45:29 +09:00
schneems 2acbcec056 [ruby/syntax_suggest] Add comments and refactor AroundBlockScan methods
https://github.com/ruby/syntax_suggest/commit/cecd12292c
2023-04-06 15:45:29 +09:00
schneems 5487ee4fe8 [ruby/syntax_suggest] Fix sibling bug to #177
While #177 is reported as being caused by a comment, the underlying behavior is a problem due to the newline that we generated (from a comment). The prior commit fixed that problem by preserving whitespace before the comment. That guarantees that a block will form there from the frontier before it will be expanded there via a "neighbors" method. Since empty lines are valid ruby code, it will be hidden and be safe.

## Problem setup

This failure mode is not fixed by the prior commit, because the indentation is 0. To provide good results, we must make the algorithm less greedy. One heuristic/signal to follow is developer added newlines. If a developer puts a newline between code, it's more likely they're unrelated. For example:

```
port = rand(1000...9999)
stub_request(:any, "localhost:#{port}")

query = Cutlass::FunctionQuery.new(
  port: port
).call

expect(WebMock).to have_requested(:post, "localhost:#{port}").
  with(body: "{}")
```

This code is split into three chunks by the developer. Each are likely (but not guaranteed) to be intended to stand on their own (in terms of syntax). This behavior is good for scanning neighbors (same indent or higher) within a method, but bad for parsing neighbors across methods.

## Problem

Code is expanded to capture all neighbors, and then it decreases indent level which allows it to capture surrounding scope (think moving from within the method to also capturing the `def/end` definition. Once the indentation level has been increased, we go back to scanning neighbors, but now neighbors also contain keywords.

For example:

```
  1 def bark
  2
  3 end
  4
  5 def sit
  6 end
```

In this case if lines 4, 5, and 6 are in a block when it tries to expand neighbors it will expand up. If it stops after line 2 or 3 it may cause problems since there's a valid kw/end pair, but the block will be checked without it.

TLDR; It's good to stop scanning code after hitting a newline when you're in a method...it causes a problem scanning code between methods when everything inside of one of the methods is an empty line.

In this case it grabs the end on line 3 and since the problem was an extra end, the program now compiles correctly. It incorrectly assumes that the block it captured was causing the problem.

## Extra bit of context

One other technical detail is that after we've decided to stop scanning code for a new neighbor block expansion, we look around the block and grab any empty newlines. Basically adding empty newlines before of after a code block do not affect the parsing of that block.

## The fix

Since we know that this problem only happens when there's a newline inside of a method and we know this particular failure mode is due to having an invalid block (capturing an extra end, but not it's keyword) we have all the metadata we need to detect this scenario and correct it.

We know that the next line above our block must be code or empty (since we grabbed extra newlines). Same for code below it. We can count all the keywords and ends in the block. If they are balanced, it's likely (but not guaranteed) we formed the block correctly. If they're imbalanced, look above or below (depending on the nature of the imbalance), check to see if adding that line would balance the count.

This concept of balance and "leaning" comes from work in https://github.com/ruby/syntax_suggest/pull/152 and has proven useful, but not been formally introduced into the main branch.

## Outcome

Adding this extra check introduced no regressions and fixed the test case. It might be possible there's a mirror or similar problem that we're not handling. That will come out in time. It might also be possible that this causes a worse case in some code not under test. That too would come out in time.

One other possible concern to adding logic in this area (which is a hot codepath), is performance. This extra count check will be performed for every block. In general the two most helpful performance strategies I've found are reducing total number of blocks (therefore reducing overall N internal iterations) and making better matches (the parser to determine if a close block is valid or not is a major bottleneck. If we can split valid code into valid blocks, then it's only evaluated by the parser once, where as invalid code must be continuously re-checked by the parser until it becomes valid, or is determined to be the cause of the core problem.

This extra logic should very rarely result in a change, but when it does it should tend to produce slightly larger blocks (by one line) and more accurate blocks.

Informally it seems to have no impact on performance:

``
This branch:
DEBUG_DISPLAY=1 bundle exec rspec spec/ --format=failures  3.01s user 1.62s system 113% cpu 4.076 total
```

```
On main:
DEBUG_DISPLAY=1 bundle exec rspec spec/ --format=failures  3.02s user 1.64s system 113% cpu 4.098 total
```

https://github.com/ruby/syntax_suggest/commit/13739c6946
2023-04-06 15:45:28 +09:00
schneems e5236471c3 [ruby/syntax_suggest] Preserve whitespace in front of comments
When removing comments I previously replaced them with a newline. This loses some context and may affect the order of the indent search which in turn affects the final result. By preserving whitespace in front of the comment, we preserve the "natural" indentation order of the line while also allowing the parser/lexer to see and join naturally consecutive (method chain) lines.

close https://github.com/ruby/syntax_suggest/pull/177
2023-04-06 15:45:28 +09:00
schneems 33cfd262fc [ruby/syntax_suggest] Handle alias already exists when debugging
When `tmp/alias` already exists, I'm now getting phantom folders in the directory pointing at older aliases which is distracting/confusing. By checking and removing that alias before symlinking we can prevent this strange behavior (possibly caused by newer Mac OS?).
2023-04-06 15:45:27 +09:00
Nobuyoshi Nakada 588dd44d41 [ruby/syntax_suggest] Remove unnecessary `--color` option
It is enabled automatically if possible.  Forcing this option makes
https://github.com/rspec/rspec-core/pull/3017 useless.

https://github.com/ruby/syntax_suggest/commit/8e7141b472
2023-04-06 15:45:27 +09:00
Vít Ondruch 69460791cc
[rubygems/rubygems] Improve comment explaining the neccessity of `write_default_spec` method.
The intention is not obvious from the commit log and it might avoid
temptation to remove the method without further consideration.

https://github.com/rubygems/rubygems/commit/8e17c50f64
2023-04-06 13:07:16 +09:00
David Rodríguez f3d69bed62
[rubygems/rubygems] Fix resolver hangs when dealing with an incomplete lockfile
While working on locking multiple platforms by default, I got an
infinite resolution loop in one of our resolver specs.

The culprit ended up being that when dealing with lockfile specs with
incomplete dependencies (spec appears in lockfile, but its dependencies
don't), those specs were not being properly expired and that tripped up
resolution.

The issue for some reason only manifests when dealing with multiple
lockfile platforms, that's why it only manifested when working on
locking multiple platforms by default.

https://github.com/rubygems/rubygems/commit/4ca72913bb
2023-04-06 13:07:16 +09:00
David Rodríguez c257380965
Revert "Refactor incomplete specs handling"
This reverts commit 69580f8b72f41c58cae57d1ada4db909922b3891.
2023-04-06 13:07:16 +09:00
David Rodríguez 192a3a6bfb
[rubygems/rubygems] Revert "Reuse `SpecSet#materialize` logic"
This reverts commit https://github.com/rubygems/rubygems/commit/a20585b4512d.

https://github.com/rubygems/rubygems/commit/aa9102659e
2023-04-06 13:07:16 +09:00
Stan Lo 2f8e5c80e6 [ruby/irb] Drop Ruby 2.6 support
(https://github.com/ruby/irb/pull/555)

* Remove all Ruby 2.6 support

* Drop Ruby 2.6 specific testing conditions

* Only run Ruby 2.7+ on CI

* Bump Ruby requirement to 2.7+

https://github.com/ruby/irb/commit/3f714b616c
2023-04-05 21:40:40 +00:00
Hiroshi SHIBATA e003784fc8 [rubygems/rubygems] util/rubocop -A --only Style/RegexpLiteral
https://github.com/rubygems/rubygems/commit/9264d83421
2023-04-05 09:50:29 +00:00
Takashi Kokubun 65d27d3c0a RJIT: Skip a class guard if known to be T_STRING 2023-04-05 00:46:10 -07:00
Takashi Kokubun 9bef39de74 RJIT: Handle include_all argument of respond_to? 2023-04-05 00:38:38 -07:00
Takashi Kokubun 66fe64b269 RJIT: Remove unused variables 2023-04-04 23:55:19 -07:00
Takashi Kokubun 2ddf6079f1 RJIT: Always use guard_two_fixnums 2023-04-04 23:52:14 -07:00
Takashi Kokubun 4e9c3b4518 RJIT: Eliminate known-result guards for blockarg 2023-04-04 23:42:14 -07:00
Takashi Kokubun 4f77d1cdb8 RJIT: Eliminate known-result branches 2023-04-04 23:30:26 -07:00
Takashi Kokubun e06bebff5e RJIT: Propagate argument types on method calls 2023-04-04 22:13:25 -07:00
Takashi Kokubun 6d8875b5d7 RJIT: Fix mapping offsets in stack_swap 2023-04-04 22:05:45 -07:00
Étienne Barrié 52ff2ce9da
Use `em_delete` in `key_delete` (#504)
* Test existing behavior

Typing Ctrl-D ends editing but typing <Del> does not.

Also renamed a test that is not testing ed_delete_next_char but
key_delete.

* Check if line empty first in em_delete

By distributivity of AND over OR, we can factor out this condition. This
will make the next commit simpler.

* Use em_delete in key_delete

When the editing mode is emacs, use `em_delete` in `key_delete`. We need
to add a condition though to `em_delete`, because it implements both
`delete-char` and `end-of-file`. We only want the `end-of-file` behavior
is the key is really Ctrl-D.

This matches the behavior of the <Del> key with readline, i.e. deleting
the next character if there is one, but not moving the cursor, while not
finishing the editing if there are no characters.
2023-04-05 08:59:12 +09:00
Jeremy Evans bb927acd3b [ruby/optparse] Document requires needed for Date/DateTime/Time/URI/Shellwords support
Fixes [Bug #19566]

https://github.com/ruby/optparse/commit/fb91d97c10
2023-04-04 23:43:58 +00:00
Peter Zhu 1da2e7fca3
[Feature #19579] Remove !USE_RVARGC code (#7655)
Remove !USE_RVARGC code

[Feature #19579]

The Variable Width Allocation feature was turned on by default in Ruby
3.2. Since then, we haven't received bug reports or backports to the
non-Variable Width Allocation code paths, so we assume that nobody is
using it. We also don't plan on maintaining the non-Variable Width
Allocation code, so we are going to remove it.
2023-04-04 17:30:06 -04:00
Hiroshi SHIBATA 06da0d1456 [rubygems/rubygems] util/rubocop -A
https://github.com/rubygems/rubygems/commit/8c9ea5d180
2023-04-04 12:20:43 +00:00
Hiroshi SHIBATA a881b33818 [rubygems/rubygems] util/rubocop -A --only Performance/RegexpMatch
https://github.com/rubygems/rubygems/commit/52ae4452c2
2023-04-04 12:20:43 +00:00
Takashi Kokubun 51b2f4c0f5 RJIT: Fix the argument of shift_stack 2023-04-04 01:17:23 -07:00
Takashi Kokubun 98f0e2c330 RJIT: Fix the argument for defined 2023-04-04 00:41:58 -07:00
Takashi Kokubun 19506650ef RJIT: Add --rjit-verify-ctx option 2023-04-04 00:35:29 -07:00
Takashi Kokubun 2c560b976e RJIT: Fix arguments to SPECIAL_CONST_P 2023-04-04 00:30:57 -07:00
Takashi Kokubun 6a4087702b RJIT: Update type information on setlocal 2023-04-03 22:42:21 -07:00
Takashi Kokubun 6ab86e4626 RJIT: Fix arguments for shift_stack 2023-04-03 21:26:40 -07:00
Takashi Kokubun 3cb5e7558d Fix a test_rubyoptions failure 2023-04-03 08:44:16 -07:00
Takashi Kokubun 46e93ef53d RJIT: Propagate self's type information 2023-04-03 00:49:10 -07:00
Takashi Kokubun ca8102355a RJIT: Upgrade type on jit_guard_known_class 2023-04-03 00:39:29 -07:00
Takashi Kokubun 1d452c2cf8 RJIT: Upgrade type to Fixnum after guard 2023-04-03 00:02:45 -07:00
Takashi Kokubun 0abe9d8b32 RJIT: Upgrade type to String after guard 2023-04-02 23:54:08 -07:00
Takashi Kokubun f0b69eb14f RJIT: Upgrade type to Array after guard 2023-04-02 23:49:55 -07:00
Takashi Kokubun d876c008ec RJIT: Limit the number of versions per block 2023-04-02 23:37:15 -07:00
Takashi Kokubun 3bacc3877a RJIT: Find a best matching block version 2023-04-02 23:24:14 -07:00
Takashi Kokubun eb51248c4c RJIT: Upgrade type to UnknownHeap after guard 2023-04-02 23:11:18 -07:00
Takashi Kokubun be4e16bc1a RJIT: Update type information on setn insn 2023-04-02 23:07:58 -07:00
Takashi Kokubun 50285d2864 RJIT: Swap type information on swap insn 2023-04-02 23:06:30 -07:00
git 0276c1d935 * remove trailing spaces. [ci skip] 2023-04-03 05:32:32 +00:00
Takashi Kokubun d546f8c518 RJIT: Store type information in Context 2023-04-02 22:32:16 -07:00
Hiroshi SHIBATA 6fb6d85aee [ruby/fileutils] Bump up v1.7.1
https://github.com/ruby/fileutils/commit/7138d85156
2023-04-03 05:19:00 +00:00
Hiroshi SHIBATA 27f709aa3c
Rename YAML::VERSION. It's conflict with Psych::VERSION 2023-04-03 12:43:11 +09:00
Hiroshi SHIBATA b5c8c73f66
Fixed version detection paths in ruby repository 2023-04-03 12:00:59 +09:00
Hiroshi SHIBATA 14f442a958 [ruby/base64] Expose Base64::VERSION
https://github.com/ruby/base64/commit/dda85a0839
2023-04-03 02:45:42 +00:00
Hiroshi SHIBATA ba4f01f0a0 [ruby/yaml] Expose YAML::VERSION
https://github.com/ruby/yaml/commit/8776bc2634
2023-04-03 02:45:18 +00:00
Hiroshi SHIBATA 6dcd399976 [ruby/tsort] Expose TSort::VERSION
https://github.com/ruby/tsort/commit/09f2275958
2023-04-03 02:41:44 +00:00
Hiroshi SHIBATA a70653ca7f [ruby/find] Expose Find::VERSION
https://github.com/ruby/find/commit/a24124a08a
2023-04-03 02:40:37 +00:00
Takashi Kokubun 8968b47ba8 RJIT: Refactor getlocal and setlocal 2023-04-02 16:50:54 -07:00
Takashi Kokubun 6002b12611 RJIT: Support entry with different PCs 2023-04-02 15:27:40 -07:00
Takashi Kokubun 4fc336127e RJIT: Support has_opt ISEQs 2023-04-02 14:47:23 -07:00
Takashi Kokubun ad2b719fc2 RJIT: C::FL_TEST_RAW returns RBOOL 2023-04-02 14:32:51 -07:00
Takashi Kokubun 57ee627929 RJIT: Lazily guard block arg
to simplify the implementation
2023-04-02 14:22:42 -07:00
Takashi Kokubun 66f8efc342 RJIT: Simplify cfunc implementation 2023-04-02 13:58:39 -07:00
Takashi Kokubun 284a0ff96c RJIT: Remove an unneeded branch 2023-04-02 12:28:49 -07:00
Takashi Kokubun 3fe134759c Skip assert_linear_performance for RJIT 2023-04-02 12:23:23 -07:00
Takashi Kokubun bf7587748d RJIT: Simplify invokesuper implementation 2023-04-02 11:42:16 -07:00
Takashi Kokubun 5cc644b147 RJIT: Group blockarg exit reasons 2023-04-02 11:01:23 -07:00
Takashi Kokubun cd1cd8030c RJIT: Support splat args 2023-04-02 10:55:03 -07:00
Takashi Kokubun 6f2535deda RJIT: Prefix a constant with C namespace 2023-04-02 10:40:37 -07:00
Takashi Kokubun 7778c292c4 RJIT: Support keyword arguments 2023-04-02 10:26:22 -07:00
Stan Lo cd94bcdc46 [ruby/irb] Don't check RUBY_ENGINE when deciding whether to accept kargs
Ruby implementations like JRuby and TruffleRuby already indicate their
compatibility target with RUBY_VERSION. We don't need to exclude
them from accepting keyword arguments as long as they target 2.7+.

https://github.com/ruby/irb/commit/bf20faa4e6

Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
2023-04-02 15:34:28 +00:00
Stan Lo f25791884c [ruby/irb] Remove dead code (https://github.com/ruby/irb/pull/554)
* Remove unused ATTR_TTY and ATTR_PLAIN constants

They were added in d7d26b51bf

But the references were removed in 1c76845cca

Co-authored-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>

* Remove unused MethodExtender module

It was added in 6cc5d718d7
but it's not used anywhere.

Co-authored-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>

* Remove unused IRB.irb_at_exit

It's not used after aaf4eb4e98

Co-authored-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>

* Remove unused InputCompletor.ignored_modules

It was added in 88311ce3c8
but the reference was removed in 78c74d2425

* Remove unused TracerLoadError constant

This constant was added in cb50fa3738
but never referenced.

---------

https://github.com/ruby/irb/commit/7de0234325

Co-authored-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
2023-04-02 14:11:12 +00:00
Takashi Kokubun 1b475fcd10 Remove an unneeded function copy 2023-04-01 23:09:05 -07:00
Takashi Kokubun a077b7e36b RJIT: Support rest args 2023-04-01 23:00:36 -07:00
Takashi Kokubun 87dc06ed24 RJIT: Comment a location for each block 2023-04-01 22:39:16 -07:00
Takashi Kokubun bf2617b8a6 RJIT: Fix has_rest exit conditions 2023-04-01 21:47:28 -07:00
Takashi Kokubun ee52255f93 RJIT: Return CantCompile early for arg0 splat 2023-04-01 21:42:34 -07:00
Takashi Kokubun 2ce5cfa2be RJIT: Save PC on String#concat 2023-04-01 21:34:19 -07:00
Takashi Kokubun e45ed2da50 RJIT: Rewind stack_size on CantCompile and side exits
so that we can take an exit whenever we want.

As a starter, this commit also pops blockarg earlier than some
CantCompile exits.
2023-04-01 21:30:42 -07:00
Takashi Kokubun 90cdc5b8ba RJIT: Let the caller of jit_push_frame handle stack_pop
because we want to do this way earlier for other types of calls.
2023-04-01 21:13:15 -07:00
Takashi Kokubun 28db75af66 RJIT: Check stackoverflow earlier for ISEQ 2023-04-01 21:03:10 -07:00
Takashi Kokubun 249fe18e8f RJIT: Remove unused counters 2023-04-01 17:24:45 -07:00
Takashi Kokubun f42cf3fd1e RJIT: Migrate invokeblock to jit_call_iseq 2023-04-01 17:17:41 -07:00
Takashi Kokubun cfea319772 RJIT: Migrate bmethod to jit_call_iseq 2023-04-01 17:03:45 -07:00
Takashi Kokubun 0973b93e49 RJIT: Start moving away from VM-like ISEQ handling 2023-04-01 16:56:05 -07:00
Hiroshi SHIBATA bc0a7a641b [ruby/net-http] typofix
https://github.com/ruby/net-http/commit/4d31bde125
2023-03-31 03:47:56 +00:00
NAKAMURA Usaku eedcd696a5 [ruby/net-http] Fix previous commit
https://github.com/ruby/net-http/commit/1b276e2654
2023-03-31 03:22:41 +00:00
NAKAMURA Usaku d8b8294c28 [ruby/net-http] Limit header length
https://github.com/ruby/net-http/commit/c245f7f9c8
2023-03-31 03:22:40 +00:00
Nobuyoshi Nakada cd65e4adca [ruby/rdoc] Use `File.binread`
https://github.com/ruby/rdoc/commit/987c609df9
2023-03-31 01:14:34 +00:00
Nobuyoshi Nakada cbfd029985 [ruby/time] Make RFC2822 regexp linear
https://hackerone.com/reports/1485501

https://github.com/ruby/time/commit/51034bda4c
2023-03-30 10:44:39 +00:00
Nobuyoshi Nakada aa3885501f [ruby/time] Fix quadratic backtracking on invalid time
https://hackerone.com/reports/1485501

https://github.com/ruby/time/commit/2444456fc1
2023-03-30 10:44:38 +00:00
Stan Lo b168141c78 [ruby/reline] Drop Dialog#scrollbar_pos as we can store it in a
local variable
(https://github.com/ruby/reline/pull/529)

https://github.com/ruby/reline/commit/d0139975fd

Co-authored-by: tomoya ishida <tomoyapenguin@gmail.com>
2023-03-29 13:51:27 +00:00
Stan Lo 02ecdf85c5 [ruby/reline] Drop Unicode.take_range's optional arg as it's never
used
(https://github.com/ruby/reline/pull/528)

https://github.com/ruby/reline/commit/428fed4a6a
2023-03-29 10:20:29 +00:00
Takashi Kokubun 9a1f6975c5 RJIT: Propagate a set of args as a CallingInfo 2023-03-29 00:44:31 -07:00
tomoya ishida e26908dc4b [ruby/reline] Improve OSC sequence regexp. OSC sequence can end with
ST(ESC\) and it should not to include \a and \e inside.
(https://github.com/ruby/reline/pull/527)

https://github.com/ruby/reline/commit/a88052adec
2023-03-29 06:54:08 +00:00
Stan Lo 1e9a218ade [ruby/reline] Expand the scanned array to later case statement more
straightforward
(https://github.com/ruby/reline/pull/526)

* Improve test coverage on Unicode.take_range

* Add test for Unicode.calculate_width

* Expand the scanned array to later case statement more straightforward
2023-03-28 12:49:49 +00:00
Hiroshi SHIBATA d766d5346b [rubygems/rubygems] Partly reverted
https://github.com/rubygems/rubygems/pull/6541

https://github.com/rubygems/rubygems/commit/21e07a04a1
2023-03-28 07:26:46 +00:00
Hiroshi SHIBATA 80be2e6c9a
Use URI-0.12.1 2023-03-28 15:27:58 +09:00
Josef Šimánek 1cbb501127
Onboard Rubocop Naming/MemoizedInstanceVariableName rule to RubyGems. 2023-03-28 15:27:35 +09:00
Hiroshi SHIBATA cd4b4ac737 [rubygems/rubygems] Use double-quotes instead of single-quotes in warnings
https://github.com/rubygems/rubygems/commit/c7f1cb9941
2023-03-28 15:25:45 +09:00
Josef Šimánek 9cfd8330ca [rubygems/rubygems] Onboard Rubocop Naming/MemoizedInstanceVariableName rule to Bundler.
https://github.com/rubygems/rubygems/commit/d768be0c65
2023-03-28 15:25:44 +09:00
David Rodríguez 4d4743f7e3 [rubygems/rubygems] Fix installing plugins in frozen mode
Plugins don't use a lockfile, so ignore frozen related settings.

https://github.com/rubygems/rubygems/commit/f17a3bb81f
2023-03-28 15:25:42 +09:00
David Rodríguez 674c960513 [rubygems/rubygems] Fix incorrect removal of "ruby" platform from lockfile
When dependencies have changed, we'll be re-resolving, and we can't
really know whether the resolution will be valid or invalid for the Ruby
platform, so skip the removal in that case.

The fix worked, but made some other specs fail, and surfaced that the
`@dependencies_changed` attribute was actually being incorrect set when
explicitly unlocking. Fixed that with an early return.

https://github.com/rubygems/rubygems/commit/20d8f5e5d9
2023-03-28 15:25:42 +09:00
David Rodríguez ed868f9a71 [rubygems/rubygems] Fix unnecessary downgrade of top level dependency when unlocking
Bundler is very conservative by default, trying to preserve versions
from the lockfile as possible, and never downgrading them. However, when
it runs into a resolution error, it still tries to find a valid
resolution.

This fallback behavior was too "brute-force" though, completely
unrestricting any gem found in the resolution conflict, and that could
lead to direct dependencies being downgraded in some edge cases.

Instead, unlock things a bit more carefully:

* First try unlocking fully pinned indirect dependencies, but leave a
  lower bound requirement in place to prevent downgrades.
* Then try unlocking any fully pinned dependency, also leaving a lower
  bound requirement in place.
* Finally completely unrestrict dependencies if nothing else worked.

https://github.com/rubygems/rubygems/commit/7f55ed8302
2023-03-28 15:25:41 +09:00
David Rodríguez eaddd386ec [rubygems/rubygems] Also set min locked requirements when not unlocking
https://github.com/rubygems/rubygems/commit/3561ac23d6
2023-03-28 15:25:40 +09:00
Takashi Kokubun 7600e6bc19 RJIT: Optimize definedivar using shapes 2023-03-27 21:56:39 -07:00
Hiroshi SHIBATA 120d8d0ae2 [ruby/uri] Bump version to 0.12.1
https://github.com/ruby/uri/commit/5c4f7d04bf
2023-03-28 02:12:22 +00:00
Nobuyoshi Nakada 23f4904f4e [ruby/uri] Fix quadratic backtracking on invalid URI
https://hackerone.com/reports/1444501

https://github.com/ruby/uri/commit/2f9585de17
2023-03-28 02:12:22 +00:00
Michael Siegfried 67f37b010a Consider prereleases regardless of whether locked
Prereleases are NOT considered even when the dependency specification
includes a prerelease segment, if the dependency is not locked. To me
that doesn't make sense, because I could create a Gemfile with say gem
"rails", ">= 7.0.0.beta1" and I'd expect prereleases considered there
even if there's no lock file yet.

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2023-03-28 01:18:50 +00:00
ima1zumi ec14b381c1 [ruby/reline] Bump version to 0.3.3
(https://github.com/ruby/reline/pull/525)

https://github.com/ruby/reline/commit/8ce176271f
2023-03-27 15:14:56 +00:00
tomoya ishida 8f569d41cb [ruby/reline] Fix cursor position overrun
(https://github.com/ruby/reline/pull/515)

* Fix cursor position overrun

* Remove unnecessary local variable

Co-authored-by: Stan Lo <stan001212@gmail.com>

---------

https://github.com/ruby/reline/commit/d4ad9b96c8

Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-03-27 13:57:16 +00:00
Hiroshi SHIBATA 36254c5ddf [rubygems/rubygems] Use append_cflags instead of directly append for CFLAGS
https://github.com/rubygems/rubygems/commit/61ec0c8389
2023-03-27 09:47:20 +00:00
Takashi Kokubun 3352e76441 RJIT: Implement leaf builtin call 2023-03-26 19:25:17 -07:00
Takashi Kokubun ff44e32f92 RJIT: Store caller sp after stack overflow check
and share some code between ISEQ and C calls.
2023-03-26 18:32:01 -07:00
Takashi Kokubun dc270fc632 RJIT: Implement attr_writer 2023-03-26 18:02:25 -07:00
Takashi Kokubun ddb77dd11e RJIT: Put a guard for splat w/ var-arg cfunc 2023-03-25 22:14:07 -07:00
Takashi Kokubun a624a5d709 RJIT: Scope down send_iseq_complex_has_block exit 2023-03-25 21:57:04 -07:00
Takashi Kokubun 1396b83153 RJIT: Fix jit_array_ptr
array_reg was clobbered before being used by heap_ptr_opnd.
heap_ptr_opnd should be loaded before array_reg is clobbered.
2023-03-25 21:43:15 -07:00
tomoya ishida 60ca800d4f [ruby/reline] Fix split_by_width to retain color sequences
(https://github.com/ruby/reline/pull/490)

* Fix split_by_width to retain color sequences

* Add OSC escape sequence testcase of Reline::Unicode.split_by_width
2023-03-25 15:01:35 +00:00
Takashi Kokubun 9bc2dbd33c RJIT: Support optional params on splat 2023-03-25 01:17:05 -07:00
Takashi Kokubun 85a55d3e75 RJIT: Remove send_iseq_complex_splat exit 2023-03-25 00:59:47 -07:00
Takashi Kokubun 314c7dd6d1 RJIT: Support splat for cfunc 2023-03-25 00:52:07 -07:00
Takashi Kokubun 1dd65f7c55 RJIT: Initial support of splat 2023-03-25 00:31:11 -07:00
Jean Boussier 276f4be96d [rubygems/rubygems] Generate native gems with `-fvisibility=hidden`
I recently ran into very nasty issues with dynamic symbols clashing between
two native gems.

I believe the overwhelming majority of native gems don't want to export
their symbols, so hidding them by default would make sense to me.

https://github.com/rubygems/rubygems/commit/449624aa54
2023-03-25 00:31:46 +00:00
Nobuyoshi Nakada 310af50c3b [ruby/time] Update required ruby version
`Regexp#match?` which is introduced at ruby 2.4 is used since https://github.com/ruby/time/pull/1852.

https://github.com/ruby/time/commit/b0a965dcaa
2023-03-23 11:45:58 +00:00
David Rodríguez a9146bd81e Don't suggest `--full-index` on API Response mismatch errors
I've never seen this error in real life, and if it was happening, I
think it's either some server side issue that would need to be fixed or
some transient issue. We should move away from the full index, since
it's slow, so let's stop recommending it.
2023-03-23 17:18:49 +09:00
David Rodríguez c3fa6679e6 Don't suggest retrying with `--full-index` on gemspec errors
We're actually already using the full index here, so it makes no sense
to suggest retrying the same thing.
2023-03-23 17:18:49 +09:00
David Rodríguez 164dc58008 Fix logging the fallback to the full index on GemspecError's
The debug message suggests retrying using `--full-index`, but the retry
is happening automatically. Just log that we are falling back to the
full index, like we do with other errors.
2023-03-23 17:18:49 +09:00
Mau Magnaguagno 069640d355 Avoid intermediate array in TarHeader#calculate_checksum
String#sum(0) sums the character bytes without a modulo.
Follow-up of #6476 based on comment from @nobu.
2023-03-23 17:18:49 +09:00
David Rodríguez a9fd1860dd Fix flaky when making materialized specs uniq
Sometimes we'll have an heterogenous array of specs which include
`Gem::Specification` objects, which don't define `#identifier`. Let's
use `#full_name` consistently.
2023-03-23 17:18:49 +09:00
なつき 1b408e659a Refactor and fix usage of Gem.ruby 2023-03-23 17:18:49 +09:00
なつき 22d037f4cc Move duplicated logic to parent class 2023-03-23 17:18:49 +09:00
なつき e46d473396 Make sure native extensions are loaded correctly in ext_conf builder 2023-03-23 17:18:49 +09:00
なつき f8ecf145ce Make sure native extensions are loaded correctly in rake builder 2023-03-23 17:18:49 +09:00
David Rodríguez a757e21bc0 Reuse `SpecSet#materialize` logic 2023-03-23 17:18:49 +09:00
David Rodríguez ebebc90ec2 Refactor incomplete specs handling
Recent bugs fixed made me realize we were relying on state too much
here. We only need to keep incomplete specs to be able to expire them
and retry resolution without them locked. If we use a separate class, we
can do that more transparently and handle them just like we handle
"missing specs".
2023-03-23 17:18:49 +09:00
David Rodríguez 8e6bbc032c Don't remove RUBY platform when healing a lockfile with missing specs 2023-03-23 17:18:49 +09:00
David Rodríguez 4e7c39f98c Don't remove RUBY platform when healing a lockfile with missing specs 2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA acf12b6dfd util/rubocop -A --only Style/AsciiComments 2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA f24a86d83f util/rubocop -A --only Layout/EmptyLineAfterMagicComment 2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 4dd418f877 util/rubocop -A --only Style/FrozenStringLiteralComment 2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 50a03035ee util/rubocop -A --only Lint/NonLocalExitFromIterator 2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 2e3cd1dc3e [rubygems/rubygems] Enabled Style/RedundantReturn cop
https://github.com/rubygems/rubygems/commit/05cc97bdf8
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA a3670249fa [rubygems/rubygems] util/rubocop -A --only Lint/Void
https://github.com/rubygems/rubygems/commit/9d25906e44
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 048230ded3 [rubygems/rubygems] util/rubocop -A --only Lint/RequireParentheses
https://github.com/rubygems/rubygems/commit/ee6814afbc
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 0eef33e113 [rubygems/rubygems] util/rubocop -A --only Style/Next
https://github.com/rubygems/rubygems/commit/e5868e92f7
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA bec069b0ca [rubygems/rubygems] util/rubocop -A --only Style/MultilineMemoization
https://github.com/rubygems/rubygems/commit/c1f6e4a97b
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 8a364b8512 [rubygems/rubygems] util/rubocop -A --only Style/MultilineTernaryOperator
https://github.com/rubygems/rubygems/commit/be853dfe3b
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 5efadf8139 [rubygems/rubygems] util/rubocop -A --only Lint/ShadowingOuterLocalVariable
https://github.com/rubygems/rubygems/commit/82ed77178d
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 8260698e74 [rubygems/rubygems] util/rubocop -A --only Lint/UnreachableCode
https://github.com/rubygems/rubygems/commit/f06047f52a
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 01be518eba [rubygems/rubygems] util/rubocop -A --only Lint/UnderscorePrefixedVariableName
https://github.com/rubygems/rubygems/commit/6dc4bc3a5b
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA ec131071b9 [rubygems/rubygems] util/rubocop -A --only Lint/ReturnInVoidContext
https://github.com/rubygems/rubygems/commit/021823a331
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 1a60012612 [rubygems/rubygems] util/rubocop -A --only Lint/RescueException
https://github.com/rubygems/rubygems/commit/e8a5db50af
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 25ed2e7415 [rubygems/rubygems] util/rubocop -A --only Lint/EmptyExpression
Thread.report_on_exception is always defined after Ruby 2.4 or later.

https://github.com/rubygems/rubygems/commit/274da54f38
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 7e3612585d [rubygems/rubygems] util/rubocop -A --only Lint/DuplicateCaseCondition
https://github.com/rubygems/rubygems/commit/df2b192e47
2023-03-23 17:18:49 +09:00
Nobuyoshi Nakada 348412c7fa [rubygems/rubygems] Use indented heredoc
https://github.com/rubygems/rubygems/commit/085d2776d8
2023-03-22 21:21:08 +00:00
Hiroshi SHIBATA 3dc4bc313f [rubygems/rubygems] RUBY_REVISION is also provided by supported platforms
https://github.com/rubygems/rubygems/commit/71a237aeec
2023-03-22 11:17:25 +00:00
Justin Searls 464a264cd4 [rubygems/rubygems] Remove reference to `pry` gem from generated `bin/console` file
This is just a suggestion, but since recent versions of Ruby have shipped with a `binding.irb` that provides almost all of the features that `pry` pioneered, it may be time to remove this suggestion in the name of simplicity and not confusing newer developers who aren't familiar with what to use.
2023-03-22 08:32:03 +00:00
Takashi Kokubun 7947920ee7 RJIT: Follow a recent CALLER_SETUP_ARG change 2023-03-21 22:12:43 -07:00
Takashi Kokubun 38946209a7 RJIT: Split has_rest_or_post exit reasons 2023-03-21 22:01:55 -07:00
Nobuyoshi Nakada f62fa51283 [ruby/erb] [DOC] Use indented heredoc
https://github.com/ruby/erb/commit/8ba8bb7acf
2023-03-21 15:05:29 +00:00
Phillip Hellewell f67f0d7268 [ruby/reline] Add key bindings for PgUp and PgDn
(https://github.com/ruby/reline/pull/509)

* Add key bindings for PgUp, PgDn

* Match behavior of readline 8.2

In the latest readline (8.2), page-up and page-down are bound to
history-search-backward and history-search-forward by default.

We would like reline to have the same default behavior.
2023-03-21 14:48:32 +00:00
Takashi Kokubun c44367265d RJIT: Fix invokesuper 2023-03-21 00:10:14 -07:00
Takashi Kokubun 70ea58bd5b RJIT: Break up RJIT send_iseq_complex exit reasons 2023-03-19 23:58:14 -07:00
Takashi Kokubun 59b86da82c RJIT: Implement ifunc invokeblock 2023-03-19 23:32:07 -07:00
Takashi Kokubun 47f7ec1c9f RJIT: Support invokeblock arity mismatches 2023-03-19 23:14:13 -07:00
Takashi Kokubun e3dc25acae RJIT: Fix ISeq invokeblock 2023-03-19 21:52:25 -07:00
Takashi Kokubun 7aeb9e20b9 RJIT: Disable ISeq invokeblock for now
since basictest is broken
2023-03-19 21:20:28 -07:00
Takashi Kokubun 2d8ecfcc9a RJIT: Implement invokeblock with ISeq 2023-03-19 20:56:37 -07:00
Takashi Kokubun 4f350dbfdd RJIT: Remove an unneeded variable 2023-03-19 20:27:57 -07:00
Takashi Kokubun 2f29044de4 RJIT: Optimize Kernel#block_given? 2023-03-19 14:15:45 -07:00
Takashi Kokubun 83ad1cac81 RJIT: Optimize Kernel#respond_to? 2023-03-19 14:04:58 -07:00
Takashi Kokubun 95c4ced39e RJIT: Optimize Array#empty? 2023-03-19 13:41:04 -07:00
Takashi Kokubun cd5a8d0160 RJIT: Optimize String#+@ 2023-03-19 13:36:26 -07:00
Takashi Kokubun 2121282753 RJIT: Optimize String#<< 2023-03-19 13:25:41 -07:00
Takashi Kokubun c4e2718763 RJIT: Workaround USE_RVARGC=0 CI 2023-03-18 23:42:58 -07:00
Takashi Kokubun 32e0c97dfa RJIT: Optimize String#bytesize 2023-03-18 23:35:42 -07:00
Takashi Kokubun 106cca5111 RJIT: Optimize String#empty? 2023-03-18 23:24:57 -07:00
Takashi Kokubun ca9355e173 RJIT: Optimize Kernel#instance_of? 2023-03-18 23:13:25 -07:00
Takashi Kokubun 824cf88969 RJIT: Optimize Kernel#is_a? 2023-03-18 22:59:46 -07:00
Takashi Kokubun cc9330f8c0 RJIT: Reorder opt_case_dispatch branches 2023-03-18 22:32:27 -07:00
Takashi Kokubun 71bcab4519 RJIT: Implement setclassvariable 2023-03-18 21:49:46 -07:00
Takashi Kokubun 8510f33cc1 RJIT: Implement intern 2023-03-18 21:42:20 -07:00
Takashi Kokubun 4a8de3fa88 RJIT: Fix toregexp 2023-03-18 21:39:24 -07:00
Takashi Kokubun 9c2792c3d3 RJIT: Implement toregexp 2023-03-18 21:37:49 -07:00
Takashi Kokubun 2eefd71e0f RJIT: Implement newrange 2023-03-18 21:24:31 -07:00
Takashi Kokubun 81e19b7d99 RJIT: Implement getglobal 2023-03-18 21:20:58 -07:00
Takashi Kokubun 9f8e914943 RJIT: Implement checkkeyword 2023-03-18 21:15:22 -07:00
tomoya ishida e8e7ff1333 [ruby/reline] Fix: line longer than terminal width breaks rendering
(https://github.com/ruby/reline/pull/516)

https://github.com/ruby/reline/commit/ae5f9b87ab
2023-03-18 14:37:10 +00:00
Takashi Kokubun dc28ccbb6d RJIT: Implement getspecial insn 2023-03-18 00:00:18 -07:00
Takashi Kokubun 93e05aaa74 RJIT: Implement putspecialobject insn 2023-03-17 23:46:56 -07:00
Takashi Kokubun 45a17013aa RJIT: Implement throw insn 2023-03-17 23:27:16 -07:00
Takashi Kokubun 644c998525 RJIT: Support --rjit-stats on release build as well 2023-03-17 22:31:41 -07:00
David Rodríguez c65d7b4bea When running `bundle lock --update <name>`, checkout locked revision of unrelated git sources directly
Since Bundler 2.4, we will try to checkout any branch specified in the
Gemfile, while until Bundler 2.3 we would directly checkout the locked
revision.

This should not make any difference in most situations, but in some edge
cases, like if the branch specified in the `Gemfile` has been renamed,
but the locked revision still exist, it causes an error now while before
it would update the lockfile without issues.

I debated which behavior was best, since I was not sure. But my
conclusion is that if the situation does not require expiring the
lockfile source in favor of the Gemfile source, we should use the locked
revision directly and proceed happily. So I restored Bundler 2.3
behavior.

I think this is consistent with how yanked gems are handled, for example.

Of course, if explicitly updating the git source itself, or all gems, we
will still get any errors like missing branches related to the git source.
2023-03-17 18:50:55 +09:00
David Rodríguez 0b9e51c429 Don´t consider platform specific candidates when `force_ruby_platform` set
This was working fine for direct dependencies using
`force_ruby_platform` explicitly through Gemfile, but not for indirect
dependencies. In general, indirect dependencies do not have this
property set, but in truffleruby this is different and the default value
is to have it set.
2023-03-17 18:50:55 +09:00
David Rodríguez 12f0be14e2 Don't ignore pre-releases when there's only one candidate
This should be a very rare edge case, however, it does happen when using
a .dev version of Bundler because in that case, that's the only version
that the resolver considers, and it should not be ignored.

We could've special cased this specifically for Bundler, but I think it
does make sense for every gem.
2023-03-17 18:50:55 +09:00
David Rodríguez ddc4fd5644 Normalize git sources
Just like gem sources, a "style-only" change, like adding a trailing
slash, should not expire them.
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 7800d4eeb5 util/rubocop -A --only Style/MultipleComparison 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA f8fe151ca9 util/rubocop -A --only Style/TernaryParentheses 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 31c572f4fa util/rubocop -A --only Style/SymbolArray 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 1ca67f13cd util/rubocop -A --only Style/RedundantSelf 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 5211900d37 util/rubocop -A --only Style/SymbolProc 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA b304cf324a util/rubocop -A --only Layout/ParameterAlignment 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 0373615948 util/rubocop -A --only Layout/SpaceInsideArrayLiteralBrackets 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 3e1f767cd5 util/rubocop -A --only Layout/DotPosition 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA b6d3c06936 util/rubocop -A --only Performance/Casecmp 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 72d09a568f [rubygems/rubygems] util/rubocop -A --only Style/RedundantBegin
https://github.com/rubygems/rubygems/commit/b595d3cf0f
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA a532e9dc37 [rubygems/rubygems] util/rubocop -A --only Style/RedundantSortBy
https://github.com/rubygems/rubygems/commit/3e4f5dc008
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 2db7673825 [rubygems/rubygems] util/rubocop -A --only Style/DoubleNegation
https://github.com/rubygems/rubygems/commit/01c2b5542f
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA be4cc74e26 [rubygems/rubygems] util/rubocop -A --only Style/IfUnlessModifierOfIfUnless
https://github.com/rubygems/rubygems/commit/97e0af2518
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA ee7475734f [rubygems/rubygems] util/rubocop -A --only Style/BarePercentLiterals
https://github.com/rubygems/rubygems/commit/02d8147243
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA bf69d1fc5d [rubygems/rubygems] util/rubocop -A --only Style/OrAssignment
https://github.com/rubygems/rubygems/commit/965fc82cfd
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA f4b073ef7a [rubygems/rubygems] util/rubocop -A --only Style/UnlessElse
https://github.com/rubygems/rubygems/commit/184c03270c
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 6ad269dc39 [rubygems/rubygems] util/rubocop -A --only Style/RescueStandardError
https://github.com/rubygems/rubygems/commit/80b57da926
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 70164eec0f [rubygems/rubygems] util/rubocop -A --only Style/RescueModifier
https://github.com/rubygems/rubygems/commit/b490379eab
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA fef0313ec7 [rubygems/rubygems] util/rubocop -A --only Style/PreferredHashMethods
https://github.com/rubygems/rubygems/commit/ae3bdc0e85
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 7b8a24ad08 [rubygems/rubygems] util/rubocop -A --only Style/EmptyCaseCondition
https://github.com/rubygems/rubygems/commit/dae8fc70a4
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 3fe5909ef1 [rubygems/rubygems] util/rubocop -A --only Style/SelfAssignment
https://github.com/rubygems/rubygems/commit/7c1168c623
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA f86296fa0a [rubygems/rubygems] util/rubocop -A --only Style/EmptyElse
https://github.com/rubygems/rubygems/commit/04227104ac
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 4ab23df2c4 [rubygems/rubygems] util/rubocop -A --only Style/RedundantParentheses
https://github.com/rubygems/rubygems/commit/295691d4dc
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA d8c5fa963f [rubygems/rubygems] util/rubocop -A --only Style/YodaCondition
https://github.com/rubygems/rubygems/commit/3594945391
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 66bd2c1a1c [rubygems/rubygems] util/rubocop -A --only Style/CommentAnnotation
https://github.com/rubygems/rubygems/commit/4e77a1d1d5
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 52ea7afa5f [rubygems/rubygems] util/rubocop -A --only Style/NegatedIf
https://github.com/rubygems/rubygems/commit/aa95ee27a2
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA bd57322bfe [rubygems/rubygems] util/rubocop -A --only Style/DefWithParentheses
https://github.com/rubygems/rubygems/commit/91391ceedf
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 03b82d1865 [rubygems/rubygems] util/rubocop -A --only Style/SingleLineMethods
https://github.com/rubygems/rubygems/commit/fa2e835ed2
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA d2cebb4e31 [rubygems/rubygems] util/rubocop -A --only Style/NumericLiterals
https://github.com/rubygems/rubygems/commit/860669b08a
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 712d6e675b [rubygems/rubygems] util/rubocop -A --only Style/RedundantInterpolation
https://github.com/rubygems/rubygems/commit/add44e56eb
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 0b632b9cdd [rubygems/rubygems] util/rubocop -A --only Style/ClassCheck
https://github.com/rubygems/rubygems/commit/1c3356a872
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 567db6064b [rubygems/rubygems] util/rubocop -A --only Style/NestedParenthesizedCalls
https://github.com/rubygems/rubygems/commit/a875fdb535
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 3d4c3f9e4f [rubygems/rubygems] util/rubocop -A --only Style/ParallelAssignment
https://github.com/rubygems/rubygems/commit/5c88c77873
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 4bb5ce8188 [rubygems/rubygems] util/rubocop -A --only Style/StringLiteralsInInterpolation
https://github.com/rubygems/rubygems/commit/cb554f6eb7
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 83f9aa8f02 [rubygems/rubygems] util/rubocop -A --only Style/Alias
https://github.com/rubygems/rubygems/commit/fba6e94de9
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA f4d1f660d0 [rubygems/rubygems] util/rubocop -A --only Layout/SpaceInsideRangeLiteral
https://github.com/rubygems/rubygems/commit/426dd97a31
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA ae81ff0c9b [rubygems/rubygems] util/rubocop -A --only Layout/MultilineBlockLayout
https://github.com/rubygems/rubygems/commit/9aa6101942
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 9a1269eaaa [rubygems/rubygems] util/rubocop -A --only Layout/MultilineArrayBraceLayout
https://github.com/rubygems/rubygems/commit/f4f45ab27e
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 26d6604343 [rubygems/rubygems] util/rubocop -A --only Layout/MultilineMethodCallBraceLayout
https://github.com/rubygems/rubygems/commit/acb0548bf6
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA ce21ce6f23 [rubygems/rubygems] util/rubocop -A --only Layout/FirstArgumentIndentation
https://github.com/rubygems/rubygems/commit/0542726fd3
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 4b285e5c6f [rubygems/rubygems] util/rubocop -A --only Layout/AssignmentIndentation
https://github.com/rubygems/rubygems/commit/8e64298989
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 9ffd73523d [rubygems/rubygems] util/rubocop -A --only Layout/EmptyLinesAroundExceptionHandlingKeywords
https://github.com/rubygems/rubygems/commit/ad1fe68d97
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 583fbc627c [rubygems/rubygems] util/rubocop -A --only Layout/EmptyLinesAroundModuleBody
https://github.com/rubygems/rubygems/commit/48c88466b7
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA c480a0c46a [rubygems/rubygems] util/rubocop -A --only Layout/LeadingCommentSpace
https://github.com/rubygems/rubygems/commit/4d680320e3
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA dab1d0ed20 [rubygems/rubygems] util/rubocop -A --only Layout/EmptyLineBetweenDefs
https://github.com/rubygems/rubygems/commit/00117e69cc
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA ab2278eb34 [rubygems/rubygems] util/rubocop -A --only Lint/UselessAccessModifier
https://github.com/rubygems/rubygems/commit/5070f90987
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA eb80f51c6d [rubygems/rubygems] util/rubocop -A --only Lint/RedundantStringCoercion
https://github.com/rubygems/rubygems/commit/58e4885493
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 05208c3875 [rubygems/rubygems] util/rubocop -A --only Lint/UnusedBlockArgument
https://github.com/rubygems/rubygems/commit/d8efd919db
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 7ab4ede4f5 [rubygems/rubygems] util/rubocop -A --only Performance/TimesMap
https://github.com/rubygems/rubygems/commit/976a351f8b
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 139f0927f5 [rubygems/rubygems] util/rubocop -A --only Performance/DoubleStartEndWith
https://github.com/rubygems/rubygems/commit/893da27e7c
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 2eb99350f4 [rubygems/rubygems] Removed rubocop:disable detected by Lint/RedundantCopDisableDirective
https://github.com/rubygems/rubygems/commit/07b0da6c24
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA fe1b0661cb [rubygems/rubygems] Removed RUBY_PATCHLEVEL and modify condition for ruby_version
https://github.com/rubygems/rubygems/commit/b420e287a3
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA b09973a995 [rubygems/rubygems] Also removed condition of RUBY_PATCHLEVEL
https://github.com/rubygems/rubygems/commit/16f381be4b
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 8e40d1e153 [rubygems/rubygems] RUBY_PATCHLEVEL was provided after Ruby 1.8.5
https://github.com/rubygems/rubygems/commit/7750d5c460
2023-03-17 18:50:55 +09:00
David Rodríguez a47c54131d [rubygems/rubygems] Remove ensure part in require
I've seen this error sometimes but never found it helpful, since the
culprit has never been thread/monitor related, so it just adds noise.

Right now I'm seeing an issue in CI where we seem to be crashing during
ensure and showing a weird backtrace:

```
#<Thread:0x000055821d7a73b8 /home/runner/work/rubygems/rubygems/lib/rubygems/request_set.rb:167 run> terminated with exception (report_on_exception is true):
/home/runner/work/rubygems/rubygems/lib/rubygems/platform.rb:141:in `==': undefined local variable or method `to_a' for false:FalseClass (NameError)
Did you mean?  to_s
	from /home/runner/work/rubygems/rubygems/lib/rubygems/core_ext/kernel_require.rb:168:in `!='
	from /home/runner/work/rubygems/rubygems/lib/rubygems/core_ext/kernel_require.rb:168:in `require'
	from /home/runner/work/rubygems/rubygems/lib/rubygems.rb:441:in `block in ensure_subdirectories'
	from /home/runner/work/rubygems/rubygems/lib/rubygems.rb:437:in `each'
	from /home/runner/work/rubygems/rubygems/lib/rubygems.rb:437:in `ensure_subdirectories'
	from /home/runner/work/rubygems/rubygems/lib/rubygems.rb:413:in `ensure_gem_subdirectories'
	from /home/runner/work/rubygems/rubygems/lib/rubygems/resolver/specification.rb:110:in `download'
	from /home/runner/work/rubygems/rubygems/lib/rubygems/request_set.rb:173:in `block (2 levels) in install'
```

Let's get this out of the picture in case that helps clarify the
culprit.

https://github.com/rubygems/rubygems/commit/87ce40b70e
2023-03-17 18:50:55 +09:00
David Rodríguez dd0f0a5e6e [rubygems/rubygems] Fix `gem uninstall` with `--install-dir`
https://github.com/rubygems/rubygems/commit/ac23687353
2023-03-17 18:50:55 +09:00
David Rodríguez 8371c0eac4 [rubygems/rubygems] Fix incorrect error message when multiple platforms are locked
https://github.com/rubygems/rubygems/commit/24d2bf9cb2
2023-03-17 18:50:55 +09:00
Mau Magnaguagno 364364c3bd [rubygems/rubygems] Improve TarHeader#calculate_checksum
String#unpack("C*") is equivalent to String#bytes and Array#inject {|a,b| a + b } is equivalent to Array#sum.
This is a minor enhancement in terms of speed and readability.
2023-03-16 12:55:01 +00:00
Hiroshi SHIBATA f3b129241c [rubygems/rubygems] Applied Layout/SpaceAroundOperators cop
https://github.com/rubygems/rubygems/commit/3139587be9
2023-03-16 01:59:12 +00:00
Hiroshi SHIBATA 760b8b7d24 [rubygems/rubygems] Change enforce style with Layout/CaseIndentation on rubygems
https://github.com/rubygems/rubygems/commit/d4938259c4
2023-03-16 01:59:11 +00:00
Hiroshi SHIBATA b528ecc164 [rubygems/rubygems] OpenSSL::Digest is always provided after Ruby 2.4
https://github.com/rubygems/rubygems/commit/4f2f2ad412
2023-03-15 11:21:21 +00:00
Hiroshi SHIBATA 04a2550928 [rubygems/rubygems] Don't use full_required_path and extension_dir under the bundler
https://github.com/rubygems/rubygems/commit/72169288ff
2023-03-15 03:35:55 +00:00
Hiroshi SHIBATA 31137dc67f [rubygems/rubygems] Removed test for
https://github.com/rubygems/rubygems/pull/6444, I have no idea to
migrate this test to bundler example
yet

https://github.com/rubygems/rubygems/commit/0d869019bf
2023-03-15 03:35:54 +00:00
Hiroshi SHIBATA 55a0fbfaf8 [rubygems/rubygems] Move build artifact detection logic for root gemspec to bundler from Gem::Specification.
Gem::Specification#missing_extension? is heavily called from RubyGems.
  We should reduce extra method call from this place.

https://github.com/rubygems/rubygems/commit/e24e59d44d
2023-03-15 03:35:54 +00:00
Takashi Kokubun d8344559b2 RJIT: Simplify how Capstone is used in tests 2023-03-13 20:42:19 -07:00
Yusuke Endoh 56dbf83a85 Prevent a warning: assigned but unused variable
... which made a test fail

http://rubyci.s3.amazonaws.com/debian10/ruby-master/log/20230313T213003Z.fail.html.gz

```
  1) Failure:
TestRubyOptions#test_enable [/home/chkbuild/chkbuild/tmp/build/20230313T213003Z/ruby/test/ruby/test_rubyoptions.rb:176]:
pid 1208 exit 0
| /home/chkbuild/chkbuild/tmp/build/20230313T213003Z/ruby/lib/ruby_vm/rjit/insn_compiler.rb:1257: warning: assigned but unused variable - argc
| /home/chkbuild/chkbuild/tmp/build/20230313T213003Z/ruby/lib/ruby_vm/rjit/insn_compiler.rb:1258: warning: assigned but unused variable - flags
.

1. [2/2] Assertion for "stderr"
   | <[]> expected but was
   | <["/home/chkbuild/chkbuild/tmp/build/20230313T213003Z/ruby/lib/ruby_vm/rjit/insn_compiler.rb:1257: warning: assigned but unused variable - argc",
   |  "/home/chkbuild/chkbuild/tmp/build/20230313T213003Z/ruby/lib/ruby_vm/rjit/insn_compiler.rb:1258: warning: assigned but unused variable - flags"]>.
```
2023-03-13 22:07:25 +09:00
Stan Lo 309ff928f5 [ruby/irb] Replace METHOD_IS_A with ===
(https://github.com/ruby/irb/pull/542)

https://github.com/ruby/irb/commit/edd6c30e16
2023-03-13 18:11:58 +00:00
Stan Lo 1095baed34 [ruby/irb] Support inspecting BasicObject
(https://github.com/ruby/irb/pull/541)

https://github.com/ruby/irb/commit/1dc2a406a3
2023-03-13 14:31:37 +00:00
Hiroshi SHIBATA 8c6b349805 [rubygems/rubygems] Removed `Gem.datadir`.
https://github.com/rubygems/rubygems/pull/2216 is imcomplete to remove this method.

https://github.com/rubygems/rubygems/commit/34ef915d12
2023-03-13 09:54:04 +00:00
Takashi Kokubun ed269c81aa RJIT: Count invokeblock exit types 2023-03-12 23:38:11 -07:00
Takashi Kokubun da9c84f859 RJIT: Rename a side exit counter 2023-03-12 22:15:58 -07:00
Takashi Kokubun d27b594841 RJIT: Fix a typo
and import a missing function
2023-03-12 22:09:05 -07:00
Takashi Kokubun 330086d3f6 RJIT: Implement definedivar 2023-03-12 22:07:02 -07:00
Takashi Kokubun 3938efa70f RJIT: Fix block param proxy on send
peek_at_stack was doubly accounting for C::VM_CALL_ARGS_BLOCKARG, which
made that case always side-exit and hide this bug.

When a block handler is block param proxy, you have to set LEP's specval
as next specval instead of block param proxy itself.
2023-03-12 22:01:38 -07:00
Takashi Kokubun a23f64221e RJIT: Fix block finding logic
like YJIT does
2023-03-12 21:14:43 -07:00
Takashi Kokubun 9cd5441d28 RJIT: Implement --rjit-trace-exits 2023-03-12 15:15:08 -07:00
Takashi Kokubun bbd9221e46 RJIT: Give up freezing InsnCompiler
for memoization
2023-03-12 13:31:15 -07:00
Takashi Kokubun 3efe4639ec RJIT: Handle Mod 10 for CMP r/m64, r64 2023-03-11 23:47:11 -08:00
Takashi Kokubun 9c220bf5e1 RJIT: Use lambda constants to match operands 2023-03-11 23:35:58 -08:00
Takashi Kokubun 8835f9d3bf RJIT: Define QwordPtr for in-clause readability 2023-03-11 22:30:54 -08:00
Takashi Kokubun 9501283dea RJIT: Leave it to NoMatchingPatternError
instead of manually implementing NotImplementedError
2023-03-11 22:25:00 -08:00
Takashi Kokubun 846fc356cb RJIT: Use case-in for exhaustive matches 2023-03-11 22:17:06 -08:00
Takashi Kokubun fe34db5a1b RJIT: Migrate SIZET values to RJIT::C constants 2023-03-11 22:04:30 -08:00
Takashi Kokubun 50c5f94ed7 RJIT: Introduce constants under RubyVM::RJIT::C 2023-03-11 21:48:28 -08:00
Takashi Kokubun 58f7e8b7f8 RJIT: Automate function pointer imports 2023-03-11 21:26:40 -08:00
Takashi Kokubun 93e34fe42e RJIT: Write initial tests for Assembler 2023-03-10 14:57:37 -08:00
Takashi Kokubun 76808b1ee4 RJIT: Start testing Assembler 2023-03-10 13:57:52 -08:00
Takashi Kokubun cdece5cf36 RJIT: Remove unused code from headers 2023-03-10 13:11:01 -08:00
Takashi Kokubun c364e0745d RJIT: Introduce --rjit-exec-mem-size 2023-03-10 13:04:45 -08:00
Ian Ker-Seymer dd47ce10db [rubygems/rubygems] Use `RbSys::ExtensionTask` when creating new rust gems
https://github.com/rubygems/rubygems/commit/125f9fece9
2023-03-10 11:50:06 +00:00
Takashi Kokubun 4afe9c09a0 RJIT: Use imemo_type_p instead
which seems safer. It seems like imemo_type can cause SEGV.
2023-03-09 22:15:16 -08:00
Takashi Kokubun 35fd79ac37 RJIT: Lazily compile global ocb 2023-03-09 21:55:14 -08:00
Hiroshi SHIBATA fade612d18 [rubygems/rubygems] Removed needless option
https://github.com/rubygems/rubygems/commit/4489361a21
2023-03-10 03:51:17 +00:00
Hiroshi SHIBATA 15739c66b7 [rubygems/rubygems] Added only missing extensions option into pristine command
https://github.com/rubygems/rubygems/commit/cfd0e615d7
2023-03-10 03:51:16 +00:00
Hiroshi SHIBATA 3926ad578c [rubygems/rubygems] Drop to support Psych 3.0 bundled at Ruby 2.5
https://github.com/rubygems/rubygems/commit/a6650c2c96
2023-03-09 13:37:06 +00:00
Hiroshi SHIBATA ea8b5e7359 [rubygems/rubygems] rubocop -a lib/rubygems/specification.rb
https://github.com/rubygems/rubygems/commit/85d60e9886
2023-03-08 23:23:45 +00:00
Hiroshi SHIBATA cb3f1f6de8 [rubygems/rubygems] Detect extension files under full_required_paths
When we use this methods with local gemspec, we don't handle
  build status of extension correctly. So We need to find extension
  files in require_paths.

  Example with ruby/erb repository:

  ```
  $ bundle exec irb
  Ignoring erb-4.0.2 because its extensions are not built. Try: gem pristine erb --version 4.0.2
  >>
  ```

https://github.com/rubygems/rubygems/commit/f90e43cf3f
2023-03-08 23:23:45 +00:00