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

1914 Коммитов

Автор SHA1 Сообщение Дата
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