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

80944 Коммитов

Автор SHA1 Сообщение Дата
David Rodríguez a1d0c048df
[rubygems/rubygems] Fix daily Bundler CI
Daily Bundler CI against ruby-head is failing because ruby-head now
uses bigdecimal 3.1.5, so that gets locked by this spec.

This change should make the test stable until bigdecimal 99.1.5 is
bundled with Ruby :)

https://github.com/rubygems/rubygems/commit/830326041f
2023-11-09 10:34:48 +09:00
David Rodríguez 28356c2870
[rubygems/rubygems] Explicitly pass install-dir when installing system gems in Bundler specs
We want to avoid any "user home" fallbacks, since that won't work with
Bundler.

So if there's a permissions issue during specs, it's best to raise
immediately.

https://github.com/rubygems/rubygems/commit/767a3e7533
2023-11-09 10:34:48 +09:00
David Rodríguez f67a80cdc0
[rubygems/rubygems] No need to let this command fail
This command is not expected to fail. If it fails, we can stop the test.

https://github.com/rubygems/rubygems/commit/2511a5b093
2023-11-09 10:34:48 +09:00
David Rodríguez d9ac2d91e0
[rubygems/rubygems] Remove unused logic
https://github.com/rubygems/rubygems/commit/2eb2860e9e
2023-11-09 10:34:48 +09:00
Matt Valentine-House 5c8d2c2d45 [PRISM] Always lookup idERROR_INFO consistently.
We know where it is in the iseq local table, because we forced it using
`iseq_set_exception_local_table` when compiling the BEGIN_NODE, so we
can always look it up from the same place.

Co-Authored-By Peter Zhu <peter@peterzhu.ca>
2023-11-08 20:28:58 -05:00
Kevin Newton 201853f4e1 [ruby/prism] Provide Parameters#signature for mirroring Method#parameters
https://github.com/ruby/prism/commit/90b3245528
2023-11-08 22:17:43 +00:00
Jemma Issroff f9e34a1fd3 [PRISM] Add tests for OptionalKeywordParameterNode
This commit adds tests for the compilation of the
OptionalKeywordParameterNode, and fixes cases on the
RequiredKeywordParameterNode
2023-11-08 18:15:47 -03:00
Jemma Issroff 70e4ff9feb [PRISM] Added tests for ForwardingParameterNode, KeywordRestParameterNode 2023-11-08 18:15:47 -03:00
Jemma Issroff 26cff6ae2b [PRISM] Add tests for several parameters nodes
This commit adds tests for BlockParameterNode, RequiredParameterNode,
RequiredKeywordParameterNode and RestParameterNode
2023-11-08 18:15:47 -03:00
Peter Zhu 8d0eb872e8 Add foo.gemspec for failing test
foo.gemspec was added in
rubygems/rubygems@8d699ed096 but was not
sync'd in commit b4bf8c9ee2. This causes
the spec to fail.
2023-11-08 13:29:10 -05:00
Jeremy Evans ddd99a5290 [ruby/tempfile] Make Tempfile#open return the underlying File
Add test for this behavior.

https://github.com/ruby/tempfile/commit/0ca31a6b8d
2023-11-08 16:47:29 +00:00
Mau Magnaguagno eb2abc3f16
YJIT: refactor format_number (#8869)
Replace enumerators with simpler and faster version that only inserts commas before '.' or end of integer string.
2023-11-08 10:37:19 -05:00
Takashi Kokubun 50402db5a7
YJIT: Disable code GC (#8865)
Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
2023-11-08 10:21:04 -05:00
git 32e89b7f9c * remove trailing spaces. [ci skip] 2023-11-08 15:20:01 +00:00
Jeremy Evans ddcfc9feab [ruby/tempfile] Fix Tempfile#{dup,clone}
Instead of storing the delegate in @tmpfile, use __getobj__, since
delegate library already handles dup/clone for that.  Copy the
unlinked, mode, and opts instance variables to the returned object
when using dup/clone.

Split the close/unlink finalizer into two finalizers. The close
finalizer always closes when any Tempfile instance is GCed, since
each Tempfile instance uses a separate file descriptor. The unlink
finalizer unlinks only when the original and all duped/cloned
Tempfiles are GCed, since all share the same path.

For Tempfile#open, undefine the close finalizer after closing the
current file, the redefine the close finalizer with the new file.

Fixes [Bug #19441]

https://github.com/ruby/tempfile/commit/dafabf9c7b
2023-11-08 15:19:52 +00:00
Burdette Lamar d80009d169
[DOC] RDoc for module Process (#8847) 2023-11-08 09:26:27 -05:00
Adam Hess f694bd158c Improve error and memory handling
Apply Nobu's suggestions which improve style, memory handling and error correction.

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-11-08 08:05:58 -05:00
Adam Hess 05cde4155c fix regex from regex memory corruption
before this change, creating a regex from a regex with a named capture, Regexp.new(/(?<name>)/), causes memory to be shared between the two named capture groups which can cause a segfault if the original is GCed.
2023-11-08 08:05:58 -05:00
Han Young b4bf8c9ee2 [rubygems/rubygems] Ensure we are using the same extension dir
Since #6945 the extension dir changed to Gem::BasicSpecification's implementation, we didn't hook that in rubygems_ext.rb. So for universal rubies, we ended up using the universal platform name when installing, but arch replaced platform name when checking. This lead to native extensions can never be correctly installed on universal rubies.

Hook Gem::BasicSpecifications so the behavior is consistent on installing and checking.

https://github.com/rubygems/rubygems/commit/8d699ed096
2023-11-08 12:40:22 +00:00
Jean Boussier 7efe0669ae TypedData_Make_Struct0: cast RTYPEDDATA_GET_DATA return pointer
Fixes:

```
/usr/local/ruby/include/ruby-3.3.0+0/ruby/internal/core/rtypeddata.h:467:33:
error: invalid conversion from ‘void*’ to ‘parser_t*’ [-fpermissive]
  467 |     (sval) = RTYPEDDATA_GET_DATA(result); \
      |              ~~~~~~~~~~~~~~~~~~~^~~~~~~~
      |                                 |
      |                                 void*
```
2023-11-08 11:33:01 +01:00
Jean Boussier d898e8d6f8 Refactor rb_shape_transition_shape_capa out
Right now the `rb_shape_get_next` shape caller need to
first check if there is capacity left, and if not call
`rb_shape_transition_shape_capa` before it can call `rb_shape_get_next`.

And on each of these it needs to checks if we got a TOO_COMPLEX
back.

All this logic is duplicated in the interpreter, YJIT and RJIT.

Instead we can have `rb_shape_get_next` do the capacity transition
when needed. The caller can compare the old and new shapes capacity
to know if resizing is needed. It also can check for TOO_COMPLEX
only once.
2023-11-08 11:02:55 +01:00
git 4abf6cde58 Update default gems list at 8cd6c65af1 [ci skip] 2023-11-08 07:05:17 +00:00
Sutou Kouhei 8cd6c65af1 [ruby/stringio] Development of 3.1.0 started.
https://github.com/ruby/stringio/commit/a2f8ef1a6a
2023-11-08 07:04:15 +00:00
tomoya ishida 8da33bff8c [ruby/irb] Skip TypeCompletion test in ruby ci
(https://github.com/ruby/irb/pull/748)

https://github.com/ruby/irb/commit/d394af0bbc
2023-11-08 06:42:10 +00:00
Yusuke Endoh 7f565b923a Prevent a warning: assigned but unused variable - raised_exception 2023-11-08 15:39:19 +09:00
Nobuyoshi Nakada 4da6333615
Export functions used for builtins 2023-11-08 13:02:55 +09:00
dependabot[bot] 906f6cfe64 Bump ruby/setup-ruby from 1.159.0 to 1.160.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.159.0 to 1.160.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Commits](54a18e26db...036ef458dd)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-07 18:48:38 -08:00
tomoya ishida e344010465 [ruby/irb] Type based completion using Prism and RBS
(https://github.com/ruby/irb/pull/708)

* Add completor using prism and rbs

* Add TypeCompletion test

* Switchable completors: RegexpCompletor and TypeCompletion::Completor

* Add completion info to irb_info

* Complete reserved words

* Fix [*] (*) {**} and prism's change of KeywordParameterNode

* Fix require, frozen_string_literal

* Drop prism<=0.16.0 support

* Add Completor.last_completion_error for debug report

* Retrieve `self` and `Module.nesting` in more safe way

* Support BasicObject

* Handle lvar and ivar get exception correctly

* Skip ivar reference test of non-self object in ruby < 3.2

* BaseScope to RootScope, move method objects constant under Methods

* Remove unused Splat struct

* Drop deeply nested array/hash type calculation from actual object. Now, calculation depth is 1

* Refactor loading rbs in test, change preload_in_thread not to cache Thread object

* Use new option added in prism 0.17.1 to parse code with localvars

* Add Prism version check and warn when :type completor cannot be enabled

* build_type_completor should skip truffleruby (because endless method definition is not supported)

https://github.com/ruby/irb/commit/1048c7ed7a
2023-11-08 02:46:33 +00:00
Sutou Kouhei 7ed37388fb [ruby/stringio] Add missing row separator encoding conversion
(https://github.com/ruby/stringio/pull/69)

The conversion logic is borrowed from ruby/ruby's io.c:
40391faeab/io.c (L4059-L4079)

Fix ruby/stringio#68

Reported by IWAMOTO Kouichi. Thanks!!!

https://github.com/ruby/stringio/commit/4b170c1a68
2023-11-08 00:46:17 +00:00
git 2f07963609 Update default gems list at ce8301084f [ci skip] 2023-11-08 00:30:22 +00:00
Sutou Kouhei ce8301084f [ruby/strscan] Bump version
https://github.com/ruby/strscan/commit/1b3393be05
2023-11-08 09:26:58 +09:00
Sutou Kouhei 9c2e0d49fe [ruby/fiddle] Remove garbage
https://github.com/ruby/fiddle/commit/bbcb66e16e
2023-11-08 09:25:45 +09:00
Sutou Kouhei c19ea1066a [ruby/fiddle] Include stdbool.h explicitly for old Ruby
https://github.com/ruby/fiddle/commit/74a05fb358
2023-11-08 09:25:45 +09:00
Sutou Kouhei 2a6d6d3d65 [ruby/fiddle] Use Ruby's true/false for C bool
GitHub: fix https://github.com/ruby/fiddle/pull/130

Reported by Benoit Daloze. Thanks!!!

https://github.com/ruby/fiddle/commit/2640e0148e
2023-11-08 09:25:44 +09:00
Jun Aruga d30ea5831e
CI: Change the openssl_fips.cnf.tmpl and openssl_fips.cnf directories. 2023-11-08 09:25:34 +09:00
tomoya ishida c8d4b103a9 [ruby/irb] Fix dancing-ruby Ctrl+C stop
(https://github.com/ruby/irb/pull/735)

https://github.com/ruby/irb/commit/802b1cb6d8
2023-11-08 09:17:23 +09:00
Nobuyoshi Nakada d8e0337d02
Escape the target string to be checked
Comparing file paths as strings may not work well for some reasons,
symlink, relative `__FILE__`, etc.

Some alternatives are possible: comparing with `File.realpath`, or
with `File.identical?`, it should be most robust to escape the target
string contained within this file itself.
2023-11-08 09:04:28 +09:00
David Rodríguez e6e4b4884d
[rubygems/rubygems] Hack to get `Gem::Specification#extensions_dir` documented
https://github.com/rubygems/rubygems/commit/625b8293f7
2023-11-08 09:04:28 +09:00
David Rodríguez 9afd2957ed
[rubygems/rubygems] Simplify spec wording and implementation
https://github.com/rubygems/rubygems/commit/3e7f1379fb
2023-11-08 09:04:28 +09:00
David Rodríguez 9f67118d7b
[rubygems/rubygems] Simplify selecting specs with `force_ruby_platform` set
https://github.com/rubygems/rubygems/commit/5f90a43635

Co-authored-by: Martin Emde <martin.emde@gmail.com>
2023-11-08 09:04:28 +09:00
David Rodríguez a131ea39b7
[rubygems/rubygems] Better error when having an insecure install folder
https://github.com/rubygems/rubygems/commit/e41156e272
2023-11-08 09:04:28 +09:00
David Rodríguez 05ea3bcf14
[rubygems/rubygems] Remove redundant error class
It's a `BundlerError`.

https://github.com/rubygems/rubygems/commit/53ea676dab
2023-11-08 09:04:28 +09:00
David Rodríguez 5b076e00ce
[rubygems/rubygems] Fix regression on old git versions
https://github.com/rubygems/rubygems/commit/abd91ca2e5
2023-11-08 09:04:28 +09:00
David Rodríguez 7f7a7f13ed
[rubygems/rubygems] Don't show bug report template when GEM_HOME has no writable bit
Instead, don't check that at all and proceed. If something fails to be
written inside GEM_HOME, we'll eventually fail with a proper permissions
error.

In addition to that, the writable bit in GEM_HOME is not even reliable,
because only the immediate parent is actually checked when writing. For
example,

```
$ mkdir -p foo/bar
$ chmod -w foo
$ touch foo/bar/baz # writes without issue
```

https://github.com/rubygems/rubygems/commit/4bced7ac73
2023-11-08 09:04:28 +09:00
David Rodríguez 2d719cd146
[rubygems/rubygems] Remove unnecessary rescue
https://github.com/rubygems/rubygems/commit/c0b549f943
2023-11-08 09:04:28 +09:00
Vít Ondruch ca7444cc44
[rubygems/rubygems] Allow `--install-dir` to be specified together with `--user-install`
The combination of `install-dir` and `--user-install` used to be
disabled for no good reason. This even makes problem on Linux
distributions such as Fedora, where `--user-install` is set by default
via operating_system.rb.

The `--install-dir` is already prefered over the `--user-install` by
the implementation, therefore just drop the check.

https://github.com/rubygems/rubygems/commit/313b1c5e76
2023-11-08 09:04:28 +09:00
Vít Ondruch bd5368fdec
[rubygems/rubygems] Don't use `util_installer` for user install
It is not nice to require install directory to be always specified,
while this option is later ignored for user installed gems.

Actually, the next step will be to remove `check_install_dir` check and
let the install dir override the user install.

https://github.com/rubygems/rubygems/commit/beb79e929f
2023-11-08 09:04:28 +09:00
Vít Ondruch d0ad90df68
[rubygems/rubygems] Check for `:install_dir` precedence over `:user_install`
https://github.com/rubygems/rubygems/commit/6539da07aa
2023-11-08 09:04:28 +09:00
Vít Ondruch 42cf1307c3
[rubygems/rubygems] Make the user installation less exceptional
The main purpose is to put handling of user installation into the same
place as e.g. handling the --build-root option handling. There is no
reason why the --build-root option should not prefix also paths used for
user installation.

Please note that the `util_installer` in
`test_generate_plugins_with_user_install` enforced the `:install_dir`,
which is against what user install is about.

https://github.com/rubygems/rubygems/commit/0b10cb41aa
2023-11-08 09:04:28 +09:00
Ellen Marie Dash acd428c823
[rubygems/rubygems] Remove kludge that should be unnecessary.
https://github.com/rubygems/rubygems/commit/f1d44ecb62
2023-11-08 09:04:28 +09:00