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

1858 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA f5df47d1f3 Merge RubyGems/Bundler master
6214d00b23
2022-10-18 16:33:15 +09:00
David Rodríguez 5fa18a7b0c [rubygems/rubygems] Fix bad spec wording
https://github.com/rubygems/rubygems/commit/06faad1e05
2022-10-18 16:33:15 +09:00
David Rodríguez e956caea88 [rubygems/rubygems] Extract matcher for slow perf spec
https://github.com/rubygems/rubygems/commit/1c0eb63c6a
2022-10-18 16:33:15 +09:00
David Rodríguez 804ae4ea12 [rubygems/rubygems] Simplify SpecGroup creation
https://github.com/rubygems/rubygems/commit/788e46e152
2022-10-18 16:33:15 +09:00
Jean Boussier 60defe0a68 thread_sync.c: Clarify and document the behavior of timeout == 0
[Feature #18982]

Instead of introducing an `exception: false` argument to have `non_block`
return nil rather than raise, we can clearly document that a timeout of 0
immediately returns.

The code is refactored a bit to avoid doing a time calculation in
such case.
2022-10-17 16:56:00 +02:00
Hiroshi SHIBATA b734832883
Skip utime example with Intel C Compiler suite 2022-10-13 13:42:22 +09:00
Nobuyoshi Nakada 6c5a8c2043 Ignore excessive precisions 2022-10-10 13:41:46 +09:00
Samuel Williams 24f3e397e9
Add spec for `Coverage.supported?` and `start(eval: true)`. (#6499)
* Don't emit coverage for eval when eval coverage is disabled.
2022-10-08 00:33:40 +13:00
Samuel Williams e4f91bbdba
Add IO#timeout attribute and use it for blocking IO operations. (#5653) 2022-10-07 21:48:38 +13:00
Samuel Williams e696ec67ac
Introduce `Fiber.blocking{}` for bypassing the fiber scheduler. (#6498) 2022-10-06 23:00:49 +13:00
David Rodríguez 358fe26b31 [rubygems/rubygems] Fix little UI issue when bundler shows duplicated gems in a list
https://github.com/rubygems/rubygems/commit/3f71d882e9
2022-10-06 05:13:39 +09:00
David Rodríguez b2668248b6 [rubygems/rubygems] Make sure RSpec diffs don't omit the different part
We sometimes check assertions on lockfile contents, which involves
comparing a reasonably long string. Sometimes RSpec is not able to show
the part of the string that's actually different, making it hard to
figure out the issue.

Configuring this setting should fix the issue in most cases.

https://github.com/rubygems/rubygems/commit/5ad8ee499e
2022-10-04 06:22:50 +09:00
Victor Gama bc6c1e0e25 [rubygems/rubygems] Copy template contents instead of file and perms
This allows the file to be created without copying permissions
from Bundler's installation source. The previous behaviour was
noticed after installing Ruby through brew, and using bundle
init, which yielded a read-only Gemfile.

https://github.com/rubygems/rubygems/commit/839a06851d
2022-10-03 20:41:45 +09:00
Victor Shepelev ad651925e3
Add Data class implementation: Simple immutable value object 2022-09-30 18:23:19 +09:00
Benoit Daloze aa53d69aa2 Add specs for {Method,UnboundMethod}#owner of a zsuper method 2022-09-29 15:48:35 +02:00
Benoit Daloze 94cea3e4d0 Fix {Method,UnboundMethod}#super_method for zsuper methods
* We need to resolve the zsuper method first, and then look the super
  method of that.
2022-09-29 15:48:35 +02:00
Hiroshi SHIBATA 9948b8bfec
Skip unpack_sockaddr_in with http at Solaris platform
http://rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20220929T050003Z.fail.html.gz
2022-09-29 15:47:08 +09:00
Benoit Daloze 31cf1bb525 Update to ruby/spec@1d9d5c6 2022-09-28 18:37:17 +02:00
Benoit Daloze 5a1ab740fc Update to ruby/mspec@b60306d 2022-09-28 18:37:16 +02:00
Jemma Issroff d594a5a8bd
This commit implements the Object Shapes technique in CRuby.
Object Shapes is used for accessing instance variables and representing the
"frozenness" of objects.  Object instances have a "shape" and the shape
represents some attributes of the object (currently which instance variables are
set and the "frozenness").  Shapes form a tree data structure, and when a new
instance variable is set on an object, that object "transitions" to a new shape
in the shape tree.  Each shape has an ID that is used for caching. The shape
structure is independent of class, so objects of different types can have the
same shape.

For example:

```ruby
class Foo
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

class Bar
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

foo = Foo.new # `foo` has shape id 2
bar = Bar.new # `bar` has shape id 2
```

Both `foo` and `bar` instances have the same shape because they both set
instance variables of the same name in the same order.

This technique can help to improve inline cache hits as well as generate more
efficient machine code in JIT compilers.

This commit also adds some methods for debugging shapes on objects.  See
`RubyVM::Shape` for more details.

For more context on Object Shapes, see [Feature: #18776]

Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Co-Authored-By: Eileen M. Uchitelle <eileencodes@gmail.com>
Co-Authored-By: John Hawthorn <john@hawthorn.email>
2022-09-28 08:26:21 -07:00
Vít Ondruch bcd30fb961 Re-enable TZ test missed due to merge conflict.
This was disabled by b7577b4d9e, while properly fixed upstream by:

https://github.com/ruby/spec/pull/939
2022-09-27 19:32:46 +02:00
Aaron Patterson 06abfa5be6
Revert this until we can figure out WB issues or remove shapes from GC
Revert "* expand tabs. [ci skip]"

This reverts commit 830b5b5c35.

Revert "This commit implements the Object Shapes technique in CRuby."

This reverts commit 9ddfd2ca00.
2022-09-26 16:10:11 -07:00
Jemma Issroff 9ddfd2ca00 This commit implements the Object Shapes technique in CRuby.
Object Shapes is used for accessing instance variables and representing the
"frozenness" of objects.  Object instances have a "shape" and the shape
represents some attributes of the object (currently which instance variables are
set and the "frozenness").  Shapes form a tree data structure, and when a new
instance variable is set on an object, that object "transitions" to a new shape
in the shape tree.  Each shape has an ID that is used for caching. The shape
structure is independent of class, so objects of different types can have the
same shape.

For example:

```ruby
class Foo
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

class Bar
  def initialize
    # Starts with shape id 0
    @a = 1 # transitions to shape id 1
    @b = 1 # transitions to shape id 2
  end
end

foo = Foo.new # `foo` has shape id 2
bar = Bar.new # `bar` has shape id 2
```

Both `foo` and `bar` instances have the same shape because they both set
instance variables of the same name in the same order.

This technique can help to improve inline cache hits as well as generate more
efficient machine code in JIT compilers.

This commit also adds some methods for debugging shapes on objects.  See
`RubyVM::Shape` for more details.

For more context on Object Shapes, see [Feature: #18776]

Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Co-Authored-By: Eileen M. Uchitelle <eileencodes@gmail.com>
Co-Authored-By: John Hawthorn <john@hawthorn.email>
2022-09-26 09:21:30 -07:00
Chris Salzberg 82ac4a2399 Support using at toplevel in wrapped script
Allow refinements to be used at the toplevel within a script that is
loaded under a module.

Fixes [Bug #18960]
2022-09-24 09:41:15 +09:00
Samuel Williams 9434a7333c Enable coverage for eval. 2022-09-22 22:19:12 +12:00
Yuta Saito 3f387e60ef Rescue File.expand_path in MSpecScript#try_load if HOME is unavailable
mspec tries to load ~/.mspecrc, but some platforms (e.g. WASI) doesn't
have HOME concept, so `~` cannot be expanded and `File.expand_path` can
fail.
2022-09-21 15:26:34 +09:00
Nobuyoshi Nakada bf72afa766
Remove warning for old TLS version connection
RubyGems.org already has refused connection requests using older than
TLS 1.2.
2022-09-15 14:48:47 +09:00
Benoit Daloze 14bcf69c9c Deprecate Encoding#replicate
* See [Feature #18949].
2022-09-10 19:02:15 +02:00
David Rodríguez e0cd466ae7 [rubygems/rubygems] Fix unused variable warning
https://github.com/rubygems/rubygems/commit/ca8d47e53a
2022-09-08 20:44:35 +09:00
David Rodríguez 24fd2f73d0 Resync Bundler & RubyGems 2022-09-08 11:25:03 +09:00
David Rodríguez 1f77cc3894 [rubygems/rubygems] Fix `set` not being found when running specs on dev rubies
https://github.com/rubygems/rubygems/commit/c5b2960388
2022-09-06 17:11:47 +09:00
David Rodríguez c664264c07 [rubygems/rubygems] Add `syntax_suggest` to exemption list in setup specs
https://github.com/rubygems/rubygems/commit/f9a51e4380
2022-09-06 17:11:47 +09:00
David Rodríguez 6bc6c8d031 [rubygems/rubygems] Remove no longer needed `fiddle` hacks
RubyInstaller has released patch versions backporting their changes to
not load `fiddle` on boot, so all these are no longer necessary.

https://github.com/rubygems/rubygems/commit/05a307deb2
2022-09-05 21:21:15 +09:00
Hiroshi SHIBATA 3eca1e438d Merge 16c3535413 2022-09-05 14:37:12 +09:00
Mike Dalessio 45fe7f7575
[rubygems/rubygems] Feature: `bundle add` supports `--path` option
https://github.com/rubygems/rubygems/commit/32bee01fbe
2022-09-05 11:43:14 +09:00
David Rodríguez f7cf641469
[rubygems/rubygems] Fix resolution hanging on musl platforms
After recent musl support was added, Bundler started hanging in musl
platforms. I identified the issue where valid candidates were being
filtered out because their platform was specified as a string, and thus
`Gem::Platform.match_spec?` which under the hood ends up calling
`Gem::Platform#===` would return `nil`, because it does not support
comparing platforms to strings.

In particular, `Bundler::EndpointSpecification`'s platform coming from
the API was not instantiated as a `Gem::Platform`, hence the issue.

Also, this spec surfaced another issue where a bug corrected in
`Gem::Platform#match_platforms` had not been yet backported to Bundler.
So this commit also backports that to get the spec green across RubyGems
versions.

Finally, the fix in `Bundler::EndpointSpecification` made a realworld
spec start failing. This spec was faking out `rails-4.2.7.1` requirement
on Bundler in the `Gemfile.lock` file to be `>= 1.17, < 3` when the real
requirement is `>= 1.17, < 2`. Due to the bug in
`Bundler::EndpointSpecification`, the real requirement provided by the
compact index API (recorded with VCR) was being ignored, and the
`Gemfile.lock` fake requirement was being used, which made the spec
pass. This is all expected, and to fix the issue I changed the spec to
be really realworld and don't fake any Bundler requirements.

https://github.com/rubygems/rubygems/commit/faf4ef46bc
2022-09-05 11:43:14 +09:00
Jean Boussier bbe5ec7846 rb_int_range_last: properly handle non-exclusive range
[Bug #18994]
2022-09-04 11:16:11 +02:00
git f069bc79f2 * append newline at EOF. [ci skip] 2022-09-02 15:57:18 +09:00
Hiroshi SHIBATA 740d530bb0
Added doc about `test-syntax-suggest` 2022-09-02 15:30:46 +09:00
Hiroshi SHIBATA e7a8e3e91f
Added entries about test-bundler-parallel and BUNDLER_SPECS 2022-09-02 15:25:54 +09:00
Takashi Kokubun 737402e938
Skip a couple of chroot spec faillures
I don't come up with a way to fix it right away. We'd need some
experiments on a pull request.
2022-08-29 09:55:57 -07:00
Benoit Daloze 1315c5aad9 Update to ruby/spec@b8a8240 2022-08-29 18:18:23 +02:00
Benoit Daloze b5358a98e6 Update to ruby/mspec@37151a0 2022-08-29 18:18:20 +02:00
Benoit Daloze 4ee1a68776 Update to ruby/spec@d01709f 2022-08-29 15:36:29 +02:00
shields 8799c91205 [rubygems/rubygems] Add platform :windows as a shortcut for all Windows platforms
https://github.com/rubygems/rubygems/commit/f3c49ad3f7
2022-08-29 00:33:15 +09:00
Aleksandr Varnin 381d8e43ce [rubygems/rubygems] Bundler: make to_lock consistent between Gem::Dependency and Bundler::Dependency
https://github.com/rubygems/rubygems/commit/971d57cf5a
2022-08-28 02:04:14 +09:00
Hiroshi SHIBATA 5e4d1f9908 Skip examples to need installed ruby exe 2022-08-26 12:15:47 +09:00
Hiroshi SHIBATA 8dfc077f70 Added syntax_suggest cli and resolve failing exapmle with it 2022-08-26 12:15:47 +09:00
Hiroshi SHIBATA bd1b1eeb0e ruby-prof is now optional 2022-08-26 12:15:47 +09:00
Hiroshi SHIBATA 0d9f4ea0d4 Import spec examples from ruby/syntax_suggest 2022-08-26 12:15:47 +09:00