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

73845 Коммитов

Автор SHA1 Сообщение Дата
Shugo Maeda 866cfb248e
Update bundled_gems 2022-09-29 21:03:57 +09:00
Jenny Shen 28840d74c2 [rubygems/rubygems] Refine error message to check the push URL instead of just the host
https://github.com/rubygems/rubygems/commit/46990f3292
2022-09-29 17:56:36 +09:00
Jenny Shen 0522e31d57 [rubygems/rubygems] Refactor tests to use Net::HTTPResponse instances for fetcher.data[:path]
https://github.com/rubygems/rubygems/commit/4d91cacb1f

Co-authored-by: Jacques Chester <jacques.chester@shopify.com>
2022-09-29 17:56:36 +09:00
Jenny Shen 17b783ad9e [rubygems/rubygems] Surface entire redirect uri in permanent redirections
https://github.com/rubygems/rubygems/commit/da7837630b
2022-09-29 17:56:35 +09:00
Jenny Shen 1cbf0fd863 [rubygems/rubygems] Add error message when api response is a permanent redirect
https://github.com/rubygems/rubygems/commit/ccca30c77a

Co-authored-by: Nick Schwaderer <nick.schwaderer@shopify.com>
2022-09-29 17:56:34 +09: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
Nobuyoshi Nakada cb16dcb184 [ruby/date] The shrunk words to be copied is limited
Th buffer size is small enough and no need to allocate dynamically.

https://github.com/ruby/date/commit/f62bf0a01d
2022-09-29 14:56:39 +09:00
Nobuyoshi Nakada 942066713b
bootstraptest/runner: run in parallel if in parallel build 2022-09-29 14:09:25 +09:00
Nobuyoshi Nakada 5a8aaedaff [ruby/date] Narrow ALLOCV region for shrunk words
https://github.com/ruby/date/commit/f51b038074
2022-09-29 14:06:36 +09:00
git 2f7a530f59 Update bundled gems list at 8c4e52fbe8 [ci skip] 2022-09-29 01:28:41 +00:00
Hiroshi SHIBATA 8c4e52fbe8
Update bundled_gems 2022-09-29 10:27:29 +09:00
Samuel Williams e7ddb6b182
Update NEWS.md with updated coverage interfaces. 2022-09-29 09:44:14 +13:00
Samuel Williams bd2fbd3588
Add `Coverage.supported?` to detect what modes are supported. 2022-09-29 09:44:14 +13:00
Samuel Williams 9dd902b831
Add `eval: true/false` flag to `Coverage.setup`. 2022-09-29 09:44:14 +13:00
David Rodríguez ac56e5c1ab [rubygems/rubygems] Put bundler gemspec stub at the right place
So that it's found when needed, rather than dynamically modifying
loaded stubs and thus messing with RubyGems internals.

https://github.com/rubygems/rubygems/commit/cd3e7cb9e5
2022-09-29 03:41:53 +09:00
David Rodríguez 668e78f01b [rubygems/rubygems] Only activate bundler when needed
Loading Bundler beforehand was actually replacing ENV with a backup of
the pre-Bundler environment through `Bundler::EnvironmentPreserver`. I
think that was making a bug in `ENV.replace` not bite our tests, because
Bundler includes proper patches to workaround that issue. So this commit
also includes these patches in RubyGems tests.

https://github.com/rubygems/rubygems/commit/8e079149b9
2022-09-29 03:41:52 +09:00
David Rodríguez 20eff52087 [rubygems/rubygems] Test a pure RubyGems method
`Gem::Specification#load_paths` is actually a Bundler thing.

https://github.com/rubygems/rubygems/commit/d20b4d1950
2022-09-29 03:41:52 +09:00
David Rodríguez 00a040dda3 [rubygems/rubygems] Little refactor to keep things consistent
https://github.com/rubygems/rubygems/commit/3934deb4e4
2022-09-29 03:41:51 +09:00
David Rodríguez 874a2bf17c [rubygems/rubygems] Remove unnecessary `ensure`
https://github.com/rubygems/rubygems/commit/6c0c02c533
2022-09-29 03:41:51 +09:00
David Rodríguez c7232a2a0a [rubygems/rubygems] Require bundler consistently
The `$LOAD_PATH` should be properly setup so that the local version is
used.

https://github.com/rubygems/rubygems/commit/03c0ab4082
2022-09-29 03:41:50 +09:00
David Rodríguez b9c426eaea [rubygems/rubygems] Remove unnecessary constant
https://github.com/rubygems/rubygems/commit/4bd77488ad
2022-09-29 03:41:50 +09:00
David Rodríguez 1e5597532a [rubygems/rubygems] Cleaup unnecessary code
https://github.com/rubygems/rubygems/commit/2e05dadbc5
2022-09-29 03:41:49 +09:00
David Rodríguez 5222a89ab6 [rubygems/rubygems] Unskip stuff that now works on JRuby
https://github.com/rubygems/rubygems/commit/d86a5ae2eb
2022-09-29 03:41:49 +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
Aaron Patterson 3e7c42a239
Shapes wrappers shouldn't mark the shape
We don't allocate shapes out of the GC anymore, so we shouldn't mark
those pointers.
2022-09-28 09:24:35 -07:00
git 414f1066b1 * expand tabs. [ci skip]
Tabs were expanded because the file did not have any tab indentation in unedited lines.
Please update your editor config, and use misc/expand_tabs.rb in the pre-commit hook.
2022-09-29 00:27:12 +09: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
Nobuyoshi Nakada a05b261464 Always use the longer version of `TRY_WITH_GC` 2022-09-28 23:51:38 +09:00
Nobuyoshi Nakada 09bce061af bootstraptest/runner: manage sub processes with the job server 2022-09-28 23:18:55 +09:00
Nobuyoshi Nakada fc54dbe8b4 bootstraptest/runner: fold dots by window size 2022-09-28 23:18:55 +09:00
David Rodríguez 3c3bd03a7c [rubygems/rubygems] Force "master" to be used regardless of `init.defaultBranch` config
Otherwise, if you have `init.defaultBranch main` configured, like I do,
a bunch of tests fail with things like:

```
============================================================================================================================================================================================================
Error: test_checkout_submodules(TestGemSourceGit): Gem::Exception: unable to find reference master in /Users/deivid/Code/rubygems/rubygems/tmp/test_rubygems_20220928-13878-xog1je/git/a
/Users/deivid/Code/rubygems/rubygems/lib/rubygems/source/git.rb:188:in `rev_parse'
/Users/deivid/Code/rubygems/rubygems/lib/rubygems/source/git.rb:143:in `dir_shortref'
/Users/deivid/Code/rubygems/rubygems/lib/rubygems/source/git.rb:158:in `install_dir'
/Users/deivid/Code/rubygems/rubygems/lib/rubygems/source/git.rb:94:in `checkout'
/Users/deivid/Code/rubygems/rubygems/test/rubygems/test_gem_source_git.rb:78:in `test_checkout_submodules'
     75:       system @git, "commit", "--quiet", "-m", "add submodule b"
     76:     end
     77:
  => 78:     source.checkout
     79:
     80:     assert_path_exist File.join source.install_dir, "a.gemspec"
     81:     assert_path_exist File.join source.install_dir, "b/b.gemspec"
============================================================================================================================================================================================================
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
E
```

In the future, I'd like to change things to use `main`, but the
straighforward fix now is to keep "master" and make the running
environment's git configuration not get in the middle.

https://github.com/rubygems/rubygems/commit/b09b1416f1
2022-09-28 23:01:20 +09:00
Peter Zhu 28a572f8bf Fix bug when slicing a string with broken encoding
Commit aa2a428 introduced a bug where non-embedded string slices copied
the encoding of the original string. If the original string had a broken
encoding but the slice has valid encoding, then the slice would be
incorrectly marked as broken encoding.
2022-09-28 09:05:23 -04:00
Peter Zhu 6f8d17e43c Make string slices views rather than copies
Just like commit 1c16645 for arrays, this commit changes string slices
to be a view rather than a copy even if it can be allocated through VWA.
2022-09-28 09:05:23 -04:00
Nobuyoshi Nakada 247d598477
Install all file trees for lldb [ci skip]
It is no longer single lldb_cruby.py only.
2022-09-28 21:27:42 +09:00
Nobuyoshi Nakada d12fce7af3 [ruby/date] Check time zone offset elements
Too big parts of fractional hour time zone offset can cause assertion
failures.

https://github.com/ruby/date/commit/06bcfb2729
2022-09-28 21:07:00 +09:00
Jeremy Evans cd77e71bba [ruby/net-http] Remove ENVIRONMENT_VARIABLE_IS_MULTIUSER_SAFE
This list is out of date.  At least OpenBSD since 2013 does not
allow one user to read the environment variables of a process
run by another user.

While we could try to keep the list updated, I think it's a bad
idea to not use the user/password from the environment, even if
another user on the system could read it.  If http_proxy exists
in the environment, and other users can read it, it doesn't
make it more secure for Ruby to ignore it.  You could argue that
it encourages poor security practices, but net/http should provide
mechanism, not policy.

Fixes [Bug #18908]

https://github.com/ruby/net-http/commit/1e4585153d
2022-09-28 17:26:03 +09:00
Hiroshi SHIBATA b58710e006
dbm and gdbm have been extracted gems. 2022-09-28 17:06:12 +09:00
Maciej Rzasa b8e804e410 [ruby/bigdecimal] Document precision=0 and ndigits=0 for converting from Float
https://github.com/ruby/bigdecimal/commit/4f0894c6c0
2022-09-28 09:29:49 +09:00
Maxime Chevalier-Boisvert a58cbddd57
YJIT: add assertion wrt label names (#6459)
Add assertion wrt label names
2022-09-27 19:27:39 -04:00
Maxime Chevalier-Boisvert 8fcbb79742
YJIT: reverse configure.ac changes that disable `--yjit-stats` on Graviton1 (#6457)
Reverse configure.ac changes that disable YJIT stats on Graviton1
2022-09-27 19:27:19 -04:00
Kevin Newton 28433e9aa0
Change IncrCounter lowering on AArch64 (#6455)
* Change IncrCounter lowering on AArch64

Previously we were using LDADDAL which is not available on
Graviton 1 chips. Instead, we're going to use an exclusive
load/store group through the LDAXR/STLXR instructions.

* Update yjit/src/backend/arm64/mod.rs

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2022-09-27 16:58:01 -04:00
Mike Dalessio 8f7f12ad64 [rubygems/rubygems] fix: Gem::Platform.match handles String argument properly
Previously 9eead86 introduced non-commutativity of platforms, and
later commit 1b9f7f50 changed the behavior of `Gem::Platform.match` to
ensure the callee of `#=~` was the gem platform.

However, when the platform argument is a String, then the callee and
argument of `#=~` are flipped (see docs for `String#=~`), which works
against the fix from 1b9f7f50.

Closes #5938

https://github.com/rubygems/rubygems/commit/3b1fb562e8
2022-09-28 05:55:28 +09:00
Burdette Lamar 5d4048e0bc
[DOC] More on IO streams (#6454)
Adds remarks about .new and .open.
Uses ..open where convenient (not convenient where output would be in a block).
Fixed examples for #ungetc.
2022-09-27 13:58:28 -05: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
Lars Kanis 9d56d9975d [ruby/timeout] Explicit add the timeout thread to default ThreadGroup
Otherwise the timeout thread would be added to the ThreadGroup of the thread that makes the first call to Timeout.timeout .

Fixes bug 19020: https://bugs.ruby-lang.org/issues/19020

Add a test case to make sure the common thread doesn't leak to another ThreadGroup

https://github.com/ruby/timeout/commit/c4f1385c9a
2022-09-28 01:59:35 +09:00
Chad Wilson 1a06bc94d9 [ruby/psych] Bump snakeyaml from 1.31 to 1.33
https://github.com/ruby/psych/commit/8a761cdfb7
2022-09-28 00:11:05 +09:00
Burdette Lamar c35e924f64
[DOC] More on IO streams (#6445)
Text is reorganized so that most of the previous text is now in these newly-created sections:
    Basic IO
    Line IO
New text is added to form new sections:
    Character IO
    Byte IO
    Codepoint IO
This gives the page a functional orientation, so that a reader can quickly find pertinent sections.
The page retains its original mission: to provide good link targets for the doc for related classes.
2022-09-27 08:50:53 -05:00
Hiroshi SHIBATA 95d5b33ea0
syntax_suggest moved under the ruby organization from zombocom 2022-09-27 12:44:30 +09: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