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

2012 Коммитов

Автор SHA1 Сообщение Дата
Daniel Colson 8edd350bda [rubygems/rubygems] Avoid crashing with a corrupted lockfile
I did a bad thing (script that edits the Gemfile.lock directly) and
ended up with a Gemfile.lock that was completely missing some indirect
dependencies. While this is my fault and an error is reasonable, I
noticed that the error got progressively less friendly in recent
versions of bundler.

Something similar came up in https://github.com/rubygems/rubygems/issues/6210,
and this commit would have helped with that case as well
(although we've already handled this a different way with #6219).

Details:
---

Back on Bundler 2.2.23, a corrupt lockfile like this would cause a helpful error:

```
Unable to find a spec satisfying minitest (>= 5.1) in the set. Perhaps the lockfile is corrupted?
```

Bundler 2.3.26 gave a helpful warning:

```
Warning:
Your lockfile was created by an old Bundler that left some things out.
Because of the missing DEPENDENCIES, we can only install gems one at a time,
instead of installing 16 at a time.
You can fix this by adding the missing gems to your Gemfile, running bundle
install, and then removing the gems from your Gemfile.
The missing gems are:
* minitest depended upon by activesupport
```

But then continued on and crashed while trying to report the unmet
dependency:

```
--- ERROR REPORT TEMPLATE -------------------------------------------------------

NoMethodError: undefined method `full_name' for nil:NilClass
lib/bundler/installer/parallel_installer.rb:127:in `block (2 levels) in check_for_unmet_dependencies'

...
```

Bundler 2.4.0 and up crash as above when jobs=1, but crash
even harder when run in parallel:

```
--- ERROR REPORT TEMPLATE -------------------------------------------------------

fatal: No live threads left. Deadlock?
3 threads, 3 sleeps current:0x00007fa6b6704660 main thread:0x00007fa6b6704660
* #<Thread:0x000000010833b130 sleep_forever>
   rb_thread_t:0x00007fa6b6704660 native:0x0000000108985600 int:0

* #<Thread:0x0000000108dea630@Parallel Installer Worker #0 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever>
   rb_thread_t:0x00007fa6b67f67c0 native:0x0000700009a62000 int:0

* #<Thread:0x0000000108dea4a0@Parallel Installer Worker #1 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever>
   rb_thread_t:0x00007fa6b67f63c0 native:0x0000700009c65000 int:0

<internal:thread_sync>:18:in `pop'
tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:42:in `deq'

...
```

Changes
---

This commit fixes the confusing thread deadlock crash by detecting if
dependencies are missing such that we'll never be able to enqueue. When
that happens we treat it as a failure so the install can finish.

That gets us back to the `NoMethodError`, which this commit fixes by
using a different warning in the case where no spec is found.

https://github.com/rubygems/rubygems/commit/d73001a21d
2023-02-09 10:29:50 +00:00
Daniel Colson 728d2f808e [rubygems/rubygems] Improve wording of unmet dependencies warning
`trying to manually editing` doesn't seem quite grammatically
correct. We could change it to `trying to manually edit` (is that a
split infinitive?), but I don't think `trying to` adds much here so
I've removed it instead so `editing` is the verb.

For the list of dependencies, the wording before this commit seemed to
reverse the dependency. "B, depended on A" sounds like B depends on A
(or did in the past but doesn't anymore?), but that's not correct. I
think there's a missing word: "B, depended on by A", but I find "B,
dependency of A" a bit nicer.

https://github.com/rubygems/rubygems/commit/49a31257e3
2023-02-08 22:20:24 +00:00
Jean Boussier 3a0f6ce1d3 Use Thread.pass until thread.stop? to wait for thread to block
[Bug #19415]

It should be more reliable
2023-02-08 11:52:59 +01:00
Jean byroot Boussier 8ce2fb9bbb Only emit circular dependency warning for owned thread shields
[Bug #19415]

If multiple threads attemps to load the same file concurrently
it's not a circular dependency issue.

So we check that the existing ThreadShield is owner by the current
fiber before warning about circular dependencies.
2023-02-08 09:50:00 +01:00
Daniel Colson fd71a76f55 [rubygems/rubygems] Add Ruby 3.2 and 3.3 platforms to Gemfile DSL
Along the same lines as https://github.com/rubygems/rubygems/pull/5469,
this adds support for Ruby 3.2 and 3.3 platforms: `:ruby_32`, `mri_32`,
etc.

It also includes a spec that should help catch this earlier in the
future, failing if we don't support platforms for the version of Ruby
that is running the tests.

https://github.com/rubygems/rubygems/commit/7cd19d824d
2023-02-07 21:12:18 +00:00
Jean byroot Boussier c19defd026 Revert "Only emit circular dependency warning for owned thread shields"
This reverts commit fa49651e05.
2023-02-06 23:30:35 +01:00
Jean Boussier fa49651e05 Only emit circular dependency warning for owned thread shields
[Bug #19415]

If multiple threads attemps to load the same file concurrently
it's not a circular dependency issue.

So we check that the existing ThreadShield is owner by the current
fiber before warning about circular dependencies.
2023-02-06 19:35:38 +01:00
Akira Matsuda 77bec15c93 [rubygems/rubygems] Properly load the generated gemspec
The previous code loads bundler's gemspec which does not include the generated
gemspec file, and thus the test was passing where it should indeed fail.
With this change, the test properly fails now.

https://github.com/rubygems/rubygems/commit/2098ea0d75
2023-02-06 16:19:46 +00:00
Hiroshi SHIBATA d3822c9a8a Merge RubyGems/Bundler master.
Pick from 5ace20dbec
2023-01-31 10:49:08 +09:00
Mike Dalessio 927141a555 [rubygems/rubygems] Add test for old lockfile with new ruby version
Given an existing application using native gems (e.g., nokogiri)
And a lockfile generated with a stable ruby version
When we test the application against ruby-head and `bundle install`
Then bundler should fall back to the generic ruby platform gem

Note that this test has been passing since 45931ac9

https://github.com/rubygems/rubygems/commit/0ecc6de378
2023-01-31 10:49:08 +09:00
Tim Bates 369ed03cd4 [rubygems/rubygems] Fix issue with extensions not compiling properly using inline gemfile
https://github.com/rubygems/rubygems/commit/fa6e6ea95c
2023-01-31 10:49:08 +09:00
Daniel Colson 8429134d0d [rubygems/rubygems] Don't warn on bundler binstubs --standalone --all
Prior to this commit `bundle binstubs --standalone --all` would output a
warning about not being able to generate a standalone binstub for
bundler.

This warning predates the `--all` option, and I don't think it makes
sense in this context. The warning makes good sense when explicitly
trying to generate a bundler standalone binstub with `bundle binstubs
bundler --standalone`, since that command won't do what the user might
have expected. But `--all` is not specifically asking for bundler, and
having it report each time that the bundler binstubs could not be
generated does not seem particularly helpful. The only way to make that
warning go away would be to stop using `--standalone --all`.

This commit skips the warning when running with the `--all` option.

https://github.com/rubygems/rubygems/commit/e6a72e19eb
2023-01-27 21:06:39 +00:00
Hiroshi SHIBATA 545ade21a2 Enable code-coverage result for test-spec 2023-01-26 15:32:29 +09:00
Hiroshi SHIBATA 6608d47bed Enable code-coverage result for test-syntax-suggest 2023-01-26 13:52:20 +09:00
Nobuyoshi Nakada 5a73e131d7 Add tests for variables in `END` block shared with the toplevel 2023-01-24 16:36:33 +09:00
Hiroshi SHIBATA 5abb2ef153
blade is hosted under ruby-lang.org now 2023-01-23 13:07:29 +09:00
Samuel Williams f5ea43a2e6
More coverage tests & specs. (#7171)
* Add spec for eval and line coverage.

* Add test for main file coverage.
2023-01-22 13:49:13 +13:00
Nobuyoshi Nakada e3336e0929 Define RUBY_VERSION_IS_3_3 macro in rubyspec.h 2023-01-18 21:59:41 +09:00
Nobuyoshi Nakada 71ce7e1825
[Bug #19335] `Integer#remainder` should respect `#coerce` (#7120)
Also `Numeric#remainder` should.
2023-01-15 13:03:27 +09:00
Peter Zhu abff5f6203 Move classpath to rb_classext_t
This commit moves the classpath (and tmp_classpath) from instance
variables to the rb_classext_t. This improves performance as we no
longer need to set an instance variable when assigning a classpath to
a class.

I benchmarked with the following script:

```ruby
name = :MyClass

puts(Benchmark.measure do
  10_000_000.times do |i|
    Object.const_set(name, Class.new)
    Object.send(:remove_const, name)
  end
end)
```

Before this patch:

```
  5.440119   0.025264   5.465383 (  5.467105)
```

After this patch:

```
  4.889646   0.028325   4.917971 (  4.942678)
```
2023-01-11 11:06:58 -05:00
Benoit Daloze 6abe20e87b Remove Encoding#replicate 2023-01-11 13:41:41 +01:00
Hiroshi SHIBATA b311c35bdb Suppressing pending messages with RSpec 2023-01-11 20:00:21 +09:00
Hiroshi SHIBATA a43f1d90c2 Merge RubyGems and Bundler master
from 0635c1423d
2023-01-10 15:53:07 +09:00
David Rodríguez 2e0159c5f2 [rubygems/rubygems] Fix resolver edge case
Let it deal with legacy gems with equivalent version and different
dependencies.

https://github.com/rubygems/rubygems/commit/b430babe97
2023-01-10 12:58:28 +09:00
Benoit Daloze 28cfc0c116 Only RangeError on CRuby for shift width >= 2**67
* It seems a better exception class too than NoMemoryError.
2023-01-07 13:18:04 +01:00
Benoit Daloze 897cf122bf Fix Integer#{<<,>>} specs with large shift width
* The limit depends on the implementation and platform, it seems unavoidable.
* See https://bugs.ruby-lang.org/issues/18518#note-9
2023-01-07 13:13:03 +01:00
Nobuyoshi Nakada e537aa65c0 [ruby/syntax_suggest] Run with the given ruby command
Running the file with shebang has a few issues.

* shebang is an OS dependent feature. Many modern UNIX-like OSes
  support it, but not all, e.g., Windows.
* `env` command may not be in `/usr/bin`.
* "ruby" command may not be "ruby", when `--program-suffix` or other
  configuration option is used.

https://github.com/ruby/syntax_suggest/commit/2edf241055
2023-01-07 17:02:49 +09:00
Benoit Daloze 2b88dbc6f9 Add bug number 2023-01-06 16:28:02 +01:00
Benoit Daloze 53938efd7b Update to ruby/spec@5e48206 2023-01-05 21:07:29 +01:00
Benoit Daloze ec14861f0d Update to ruby/spec@7e680fa 2023-01-05 20:23:57 +01:00
git 54950a78e3 * remove trailing spaces, append newline at EOF. [ci skip] 2023-01-05 18:06:01 +00:00
Benoit Daloze bbf54ec334 Update to ruby/spec@9d69b95 2023-01-05 19:05:29 +01:00
Benoit Daloze cd5e6cc0ea Update to ruby/mspec@fef9b81 2023-01-05 19:05:27 +01:00
yoka 799d805e21 [rubygems/rubygems] Raise invalid option when bundle open --path is called without a value
https://github.com/rubygems/rubygems/commit/c242311158
2023-01-04 13:13:19 +00:00
yoka 87c17a141d [rubygems/rubygems] Enhance bundle open with --path option
https://github.com/rubygems/rubygems/commit/3bf8e59304
2023-01-04 13:13:19 +00:00
Jeremy Evans 0903a25179 Make IO#set_encoding with binary external encoding use nil internal encoding
This was already the behavior when a single `'external:internal'`
encoding specifier string was passed.  This makes the behavior
consistent for the case where separate external and internal
encoding specifiers are provided.

While here, fix the IO#set_encoding method documentation to
state that either the first or second argument can be a string
with an encoding name, and describe the behavior when the
external encoding is binary.

Fixes [Bug #18899]
2023-01-01 09:00:24 -08:00
Kenta Murata 9f2378959e
numeric.c: Fix round_half_even for specific values (#7023)
Handle the integert and the float parts separately in round_half_even
to prevent error occursions in floating point calculation.
2022-12-26 21:02:47 +09:00
Hiroshi SHIBATA b7ad60a794 Merge RubyGems/Bundler master
from 72fd3dd209
2022-12-26 15:09:21 +09:00
Nobuyoshi Nakada 5df7118445
Skip insanely memory consuming tests
These tests do not only consume hundreds GiB bytes memory, result in
`rb_bug` when `RUBY_DEBUG` is enabled.
2022-12-26 15:01:44 +09:00
Hiroshi SHIBATA a236661a62
Skip some examples for Ruby 3.3 2022-12-26 13:52:48 +09:00
David Rodríguez 8f05e4f54b Update Bundler to 2.4.1 & and RubyGems to 3.4.1 2022-12-25 05:55:36 +09:00
Lars Kanis d0f5dc9eac Windows: Prefer USERPROFILE over HOMEPATH
HOMEPATH is set to "\WINDOWS\system32" when running per "runas" session.
This directory is not writable by ordinary users, leading to errors with many ruby tools.
Also config files in the home directory are not recognized.

Still keeping HOME at first which is not used by native Windows,
but by ruby specs and by MSYS2 environment.
2022-12-24 23:48:47 +09:00
Lars Kanis d6ce4180a5 Windows: Fix encoding of Dir.home
Dir.home returns an UTF-8 string since ruby-3.0, but the actual
encoding of the bytes was CP_ACP or CP_OEMCP.
That led to invalid bytes when calling Dir.home with an unicode
username.
2022-12-24 22:54:23 +09:00
Hiroshi SHIBATA f6620037ba Merge RubyGems-3.4.0 and Bundler-2.4.0 2022-12-24 16:57:07 +09:00
Hiroshi SHIBATA 4aeea3cc09 Removed the needless test guard for syntax_suggest.
It's resolved by 5bb43aeb89
2022-12-23 14:07:02 +09:00
Nobuyoshi Nakada bf3b376522 [ruby/syntax_suggest] Remove debug print
https://github.com/ruby/syntax_suggest/commit/4d53d31bc5
2022-12-23 13:05:26 +09:00
Nobuyoshi Nakada 5bb43aeb89 [ruby/syntax_suggest] Should not hardcode ruby name
https://github.com/ruby/syntax_suggest/commit/0d5201b24d
2022-12-23 13:05:25 +09:00
Jeremy Evans 7e8fa06022 Always issue deprecation warning when calling Regexp.new with 3rd positional argument
Previously, only certain values of the 3rd argument triggered a
deprecation warning.

First step for fix for bug #18797.  Support for the 3rd argument
will be removed after the release of Ruby 3.2.

Fix minor fallout discovered by the tests.

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-12-22 11:50:26 -08:00
Benoit Daloze 0efa36ac06 Ensure Fiber storage is only accessed from the Fiber it belongs to 2022-12-20 19:32:23 +01:00
Benoit Daloze 45175962a6 Never use the storage of another Fiber, that violates the whole design
* See https://bugs.ruby-lang.org/issues/19078#note-30
2022-12-20 19:32:23 +01:00
Hiroshi SHIBATA 18ba89093a Merge RubyGems/Bundler master
Pick from ba3adad4d8
2022-12-20 13:15:02 +09:00
Mark Burns 870bcc96ba [rubygems/rubygems] fix
https://github.com/rubygems/rubygems/pull/6147 when --parseable and
--groups used
together

https://github.com/rubygems/rubygems/commit/3b0b95c509
2022-12-20 13:15:02 +09:00
Josef Šimánek 8eb6618013 [rubygems/rubygems] Turn `--ext` option into string. Deprecate usage without explicit value.
- this is preparation for onboarding Rust based extension gem generator

https://github.com/rubygems/rubygems/commit/d32801bdbc
2022-12-20 13:15:02 +09:00
Josef Šimánek f270aa3eda [rubygems/rubygems] Use safe Marshal deserialization for dependency API response. - adds Bundler#safe_load_marshal and Bundler::SAFE_MARSHAL_CLASSES listing safe classes to deserialize
https://github.com/rubygems/rubygems/commit/e947c608cc
2022-12-20 13:15:02 +09:00
David Rodríguez 1db9bcfeaf [rubygems/rubygems] Fix crash when building resolution errors with OR requirements
https://github.com/rubygems/rubygems/commit/8f287479bc
2022-12-20 13:15:02 +09:00
Michael Siegfried 32e72b78b3 [rubygems/rubygems] Add tests for bundle lock
Ensure `bundle lock` handles pre flag just like bundle update does.

https://github.com/rubygems/rubygems/commit/b9e85e3157
2022-12-20 13:15:02 +09:00
Michael Siegfried 42972bdd92 [rubygems/rubygems] Test the public interface
With `GemVersionPromoter#sort_versions` being so simple, we no longer
need to reach into the class's internals to make private methods public
in order to effectively test. We can just allow both cases to go through
the main method.

https://github.com/rubygems/rubygems/commit/6cbe891003
2022-12-20 13:15:02 +09:00
Michael Siegfried 2bc4f1dea5 [rubygems/rubygems] Support for pre flag in `bundle update`
Passing this flag allows bumping to the current version, even if that
version is prerelease. This works in concert with the current flags.

https://github.com/rubygems/rubygems/commit/a6409e3509
2022-12-20 13:15:02 +09:00
David Rodríguez 3fd33590f6 [rubygems/rubygems] Fix crash when lockfile is missing dependencies
We have a check for a corrupt lockfile right before installing. However,
the check accounted for locked specs not satisfying locked dependencies,
but not for locked specs missing for some locked dependencies.

Instead of fixing this check, I decided to remove it in favor of
automatically detecting the situation and re-resolve to automatically
fix the lockfile rather than printing a warning but leave the problem
there.

https://github.com/rubygems/rubygems/commit/4a7a584252
2022-12-20 13:15:02 +09:00
Alyssa Ross d4315284e9 [rubygems/rubygems] Add bundle lock --update --bundler
bundle lock --update can do everything that bundle update can do, but
it doesn't actually install gems. This is especially useful for
generating a lockfile on a machine that doesn't have the libraries
available to be able to build native extensions.

But, there was no parallel for bundle update --bundler. So let's add
one.

https://github.com/rubygems/rubygems/commit/7fc00bd2a5
2022-12-18 19:17:42 +00:00
Hiroshi SHIBATA 49b0f3b024 Merge RubyGems/Bundler master
Pick from 084f7d1f21
2022-12-15 19:06:40 +09:00
Samuel Williams d20bd06a97
Remove `require 'io/wait'` where it's no longer necessary. (#6932)
* Remove `require 'io/wait'` as it's part of core now.

* Update ruby specs using version gates.

* Add note about why it's conditional.
2022-12-15 11:37:01 +13:00
David Rodríguez 6d00053c74 [rubygems/rubygems] Use better matcher
Hopefully it gives a better error.

https://github.com/rubygems/rubygems/commit/5bc9ff64b6
2022-12-13 12:41:08 +09:00
Hiroshi SHIBATA bbe56a6437 Merge RubyGems/Bundler master
from bfb0ae6977
2022-12-12 10:49:43 +09:00
Samuel Williams 22d391dc63
Add spec for fiber storage. (#6896) 2022-12-10 13:54:53 +13:00
Nobuyoshi Nakada fe67998816
Clean up a temporary file 2022-12-09 22:15:38 +09:00
Nobuyoshi Nakada 11acb7f7bc
[Bug #19167] Remove useless conversion of classes for special const 2022-12-09 22:11:44 +09:00
Hiroshi SHIBATA 93ac1503be Added condition for ruby/ruby repository 2022-12-09 16:36:22 +09:00
Hiroshi SHIBATA 0677bbe3ff Merge syntax_suggest master
Pick from daee74dcb0
2022-12-09 16:36:22 +09:00
Hiroshi SHIBATA a4e14b9d9d Merge RubyGems/Bundler master
Pick from 823c776d95
2022-12-09 16:36:22 +09:00
Samuel Williams 6fd5d2dc00
Introduce `IO.new(..., path:)` and promote `File#path` to `IO#path`. (#6867) 2022-12-08 18:19:53 +13:00
Aaron Patterson a89d856f26 Update spec/bundler/bundler/fetcher/compact_index_spec.rb
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2022-12-07 09:57:11 -08:00
Aaron Patterson edc7af48ac Stop transitioning to UNDEF when undefining an instance variable
Cases like this:

```ruby
obj = Object.new
loop do
  obj.instance_variable_set(:@foo, 1)
  obj.remove_instance_variable(:@foo)
end
```

can cause us to use many more shapes than we want (and even run out).
This commit changes the code such that when an instance variable is
removed, we'll walk up the shape tree, find the shape, then rebuild any
child nodes that happened to be below the "targetted for removal" IV.

This also requires moving any instance variables so that indexes derived
from the shape tree will work correctly.

Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com>
Co-authored-by: John Hawthorn <jhawthorn@github.com>
2022-12-07 09:57:11 -08:00
Martin Dürst e0487ec45e update rbconfig spec to Unicode version 15.0.0
(this includes emoji version 15.0)
2022-12-06 10:11:33 +09:00
Nobuyoshi Nakada 7b2306a3ab
Remove unguaranteed assertion [ci skip]
It can be configured by `--with-os-version-style=TYPE` option, and
just copies from theApple's installation as the default.  We don't
know why it is major only.
2022-12-03 11:27:16 +09:00
Koichi Sasada 59e389af28 UnboundMethod only refer defined_class
UnboundMethod records caller's class, like `D` or `E` on the
following case:

```ruby
class C
  def foo = :foo
end

class D < C
end

class E < C
end

d = D.instance_method(:foo)
e = E.instance_method(:foo)
```

But `d` and `e` only refers `C#foo` so that UnboundMethod doesn't
record `D` or `E`. This behavior changes the following methods:

* `UnboundMethod#inspect` (doesn't show caller's class)
* `UnboundMethod#==` (`d == e` for example)

fix https://bugs.ruby-lang.org/issues/18798
2022-12-03 08:53:12 +09:00
Hiroshi SHIBATA d55d1a737b
Skip examples for SyntaxError extensions on Ruby 3.2 2022-12-02 10:34:00 +09:00
Nobuyoshi Nakada 9da2a5204f
[Bug #19087] Merge to "trailing garbage" case 2022-12-02 01:50:48 +09:00
Nobuyoshi Nakada c94cd8534a
[Bug #19087] Fix an assertion of `String#to_c` 2022-12-02 01:47:30 +09:00
schneems d6e91784ab Update SyntaxSuggest to use angle brackets `>`
```
$ ruby tool/sync_default_gems.rb syntax_suggest
Sync ruby/syntax_suggest
```

https://github.com/ruby/syntax_suggest/pull/161
2022-11-30 12:58:47 +09:00
schneems f64ba0fadd
[ruby/syntax_suggest] Do not output "Syntax OK" when there's an error
Due to a problem with ripper we do not recognize `break` as invalid code. It's confusing that "Syntax OK" is output in that case.

When there's no syntax error, the algorithm should not say anything. The exception is in the CLI and that's for compatibility with `ruby -wc`

```
$ cat /tmp/break.rb
break
️ 3.1.2 🚀 /Users/rschneeman/Documents/projects/syntax_suggest (schneems/no-syntax-not-okay-break)
$ ruby -wc /tmp/break.rb
Syntax OK
```

> Note that this is invalid, running this code will raise a Syntax error.

```
$ exe/syntax_suggest /tmp/break.rb
Syntax OK
```

Close https://github.com/ruby/syntax_suggest/pull/157

https://github.com/ruby/syntax_suggest/commit/d7bd8f03a2
2022-11-28 20:55:41 +09:00
schneems 4d51a0b495
[ruby/syntax_suggest] Failing test for #157
https://github.com/ruby/syntax_suggest/commit/14e8cdc916
2022-11-28 20:55:41 +09:00
Jeremy Evans 571d21fd4a Make String#rstrip{,!} raise Encoding::CompatibilityError for broken coderange
It's questionable whether we want to allow rstrip to work for strings
where the broken coderange occurs before the trailing whitespace and
not after, but this approach is probably simpler, and I don't think
users should expect string operations like rstrip to work on broken
strings.

In some cases, this changes rstrip to raise
Encoding::CompatibilityError instead of ArgumentError.  However, as
the problem is related to an encoding issue in the receiver, and due
not due to an issue with an argument, I think
Encoding::CompatibilityError is the more appropriate error.

Fixes [Bug #18931]
2022-11-24 18:24:42 -08:00
Nobuyoshi Nakada 36f297e621
Use valid tokens as cookie names 2022-11-22 11:32:28 +09:00
MSP-Greg cf05c202ce Fixup spec/ruby/optional/capi/rbasic_spec.rb for mswin 2022-11-21 19:52:44 +01:00
David Rodríguez c925a2ee91
Update RSpec gems 2022-11-15 14:45:51 +09:00
Takashi Kokubun 18fa7059e8
Deal with different Ruby versions 2022-11-12 22:15:40 -08:00
Takashi Kokubun c0735d1d72
Fix a CI failure in bigdecimal 2022-11-12 21:55:00 -08:00
Hiroshi SHIBATA 0a9d51ee9d Migrate our resolver engine to PubGrub
https://github.com/rubygems/rubygems/pull/5960

  Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2022-11-12 07:40:31 +09:00
Hiroshi SHIBATA 28611be6ee Merge RubyGems/Bundler master from ee2f8398324af4bc1b95f7565ce2fda98126e026 2022-11-11 17:24:08 +09:00
Yusuke Endoh d5513da01d [rubygems/rubygems] Update bundler/spec/bundler/shared_helpers_spec.rb
https://github.com/rubygems/rubygems/commit/8b1481ba77

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-11-10 22:45:31 +00:00
Yusuke Endoh b5f809c496 [rubygems/rubygems] Load "bundler/setup" in lib/rubygems.rb
Ruby interpreter loads some special gems at startup: did_you_mean,
error_highlight, and syntax_suggest. These gems are loaded before
`bundler/setup` is loaded by `RUBYOPT=-rbundler/setup`.
So, the versions of the gems are not controllable by Gemfile.

This change will `require "bundler/setup"` in rubygems.rb (i.e., before
the special gems are loaded). Now `bundle exec` sets an environment
variable `BUNDLER_SETUP`, and rubygems requires the variable if defined.

See also: https://bugs.ruby-lang.org/issues/19089

https://github.com/rubygems/rubygems/commit/963cb65a2d
2022-11-10 22:45:31 +00:00
Bo Anderson 0df47fdaf9 [rubygems/rubygems] Add tests for universal Ruby with arch-specific prebuilt gems
https://github.com/rubygems/rubygems/commit/11229b16c3
2022-11-08 17:05:19 +00:00
Nobuyoshi Nakada cb2323a983
Thread#native_thread_id is very platform specific 2022-11-08 09:31:58 +09:00
Benoit Daloze 83decbb62b Update to ruby/spec@740ccc8 2022-11-07 20:05:30 +01:00
Benoit Daloze c99e4c4278 Update to ruby/mspec@1e16420 2022-11-07 20:05:18 +01:00
Nobuyoshi Nakada ee86b57ee5
Revert jobserver handling in spec 2022-11-07 15:54:40 +09:00
Nobuyoshi Nakada b02b8e7756
Let other test runners follow the change of GNU make 4.4 jobserver 2022-11-07 10:08:30 +09:00
Nobuyoshi Nakada 174ddc79c5
Skip `File.atime`/`File.mtime` tests randomly failing on Travis
Not only powerpc64le, also s390x and arm32 seem failing too.  These
failures are probably caused by filesystem settings on Travis, but
unrelated to CPUs.
2022-10-24 09:32:13 +09:00
Stephen Ierodiaconou 54cad3123a
[Bug #19004] `Complex.polar` handles complex singular `abs` argument
`Complex.polar` accepts Complex values as arguments for the polar form as long
as the value of the complex has no imaginary part (ie it is 'real'). In
`f_complex_polar` this is handled by extracting the real part of the arguments.
However in the case `polar` is called with only a single argument, the absolute
value (abs), then the Complex is created without applying a check on the type
of abs, meaning it is possible to create a Complex where the real part is itself
an instance of a Complex. This change removes the short circuit for the single
argument case meaning the real part extraction is performed correctly
(by f_complex_polar).

Also adds an example to `spec/ruby/core/complex/polar_spec.rb` to check that
the real part of a complex argument is correctly extracted and used in the
resulting Complex real and imaginary parts.
2022-10-23 12:59:06 +09:00