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

2392 Коммитов

Автор SHA1 Сообщение Дата
Jean Boussier a5c5f83b24 Make `const_source_location` return the real constant as soon as defined
[Bug #20188]

Ref: https://github.com/fxn/zeitwerk/issues/281#issuecomment-1893228355

Previously, it would only return the real constant location once the
autoload was fully completed.
2024-03-13 09:39:09 +01:00
Hiroshi SHIBATA 2bc4575ac0 Removed unused fixtures at time examples 2024-03-07 10:05:53 +09:00
Nobuyoshi Nakada 29d3d13a1f
Run `binding.irb` in cleaner environment and clean the history file 2024-03-06 20:44:09 +09:00
Hiroshi SHIBATA 51965399df Use include instead of equal assertion.
irb will load multiple rc files now. If developer have their rcfile on
home directory or etc, equal assertion will fail with custom prompt.
2024-03-06 10:38:25 +09:00
cui fliter 226a889dc7
[DOC] fix some comments
Signed-off-by: cui fliter <imcusg@gmail.com>
2024-03-05 18:50:47 +09:00
Nobuyoshi Nakada b582e5a6e9 [rubygems/rubygems] Clear generated files recursively
On macOS, `dsymutil` utility splits debug info into .dSYM directory.
Glob list of `.bundle/cache/extensions/**/*binary_c*` includes that
directory but `FileUtils.rm` fails to unlink a directory.

https://github.com/ruby/ruby/actions/runs/8149918901/job/22275331688#step:11:3000
```
       Operation not permitted @ apply2files - /Users/runner/work/ruby/ruby/src/tmp/2/home/.bundle/cache/extensions/arm64-darwin-22/ruby/3.4.0+0/3b02a1011c53518f911ab3a9e8c6c608/very_simple_binary-1.0/very_simple_binary_c.bundle.dSYM
     # ./lib/fileutils.rb:2332:in 'File.unlink'
     # ./lib/fileutils.rb:2332:in 'block in FileUtils::Entry_#remove_file'
     # ./lib/fileutils.rb:2337:in 'FileUtils::Entry_#platform_support'
     # ./lib/fileutils.rb:2331:in 'FileUtils::Entry_#remove_file'
     # ./lib/fileutils.rb:1475:in 'FileUtils.remove_file'
     # ./lib/fileutils.rb:1223:in 'block in FileUtils.rm'
     # ./lib/fileutils.rb:1222:in 'FileUtils.rm'
     # ./spec/bundler/install/global_cache_spec.rb:235:in 'block (3 levels) in <top (required)>'
```

https://github.com/rubygems/rubygems/commit/375c127684
2024-03-05 07:13:39 +00:00
Yuta Saito ef5af32799 [rubygems/rubygems] Clear `RUBY_CODESIGN` env var while running tests
The `RUBY_CODESIGN` environment variable is used by mkmf-generated
Makefile to sign extension bundles on macOS. The variable specifies a
key identifier to use for signing given by the user. However, the key
is usually stored in `$HOME/Library/Keychains` directory, and the test
suite creates a fake `$HOME` directory. This causes the test suite to
try to find the specified key from the fake home directory, which
results in a failure.

https://github.com/rubygems/rubygems/commit/ddcfc65bf7
2024-03-04 06:36:29 +00:00
Thomas Marshall 7e4b1f8e19
[Bug #20322] Fix rb_enc_interned_str_cstr null encoding
The documentation for `rb_enc_interned_str_cstr` notes that `enc` can be
a null pointer, but this currently causes a segmentation fault when
trying to autoload the encoding. This commit fixes the issue by checking
for NULL before calling `rb_enc_autoload`.
2024-03-03 10:43:35 +00:00
Nobuyoshi Nakada 9b75e5f085
Add an example for fallback to sh 2024-03-01 13:56:52 +09:00
Kevin Newton 49aa8d655e [PRISM] Fix version spec to account for prism 2024-02-28 11:42:49 -05:00
Kenta Murata 54a5b82944
Handle zero-like imaginary part as zero in to_r (#9581)
Fixes [Bug #5179]
2024-02-27 09:37:03 +09:00
Benoit Daloze 815db5c028 Update to ruby/spec@3a510bb 2024-02-26 14:45:30 +01:00
Benoit Daloze 40c9a3dad5 Update to ruby/mspec@36e8ed8 2024-02-26 14:45:28 +01:00
Peter Zhu 510404f2de Stop using rb_fstring publicly
rb_fstring is a private API, so we should use rb_str_to_interned_str
instead, which is a public API.
2024-02-23 13:33:46 -05:00
Nobuyoshi Nakada 8c5b7eb05f
[Bug #20280] Fix wrong tests 2024-02-19 16:33:27 +09:00
Hiroshi SHIBATA a52fc5df7a [rubygems/rubygems] Use FileUtils.mkdir_p
https://github.com/rubygems/rubygems/commit/af806b8dff
2024-02-19 05:45:51 +00:00
Hiroshi SHIBATA fbc29ce032
Avoid to fail with race condition 2024-02-16 18:16:15 +09:00
Hiroshi SHIBATA 62ab93357f Try to test net-ftp examples again 2024-02-16 17:28:00 +09:00
Hiroshi SHIBATA 7b568b1f78 [rubygems/rubygems] bin/rubocop -a
https://github.com/rubygems/rubygems/commit/f79a6a004d
2024-02-16 05:38:41 +00:00
Jason Garber 6f224d66a5 [rubygems/rubygems] Add `gitlab:` Git source shorthand
This new shorthand, similar to the existing `github:` shorthand, adds
support for Gitlab repositories with a notable difference. Gitlab
projects may be organized into projects and subprojects. An example
Ruby gem exists at:

https://gitlab.com/gitlab-org/analytics-section/product-analytics/gl-application-sdk-rb

With the new shorthand, a user may install this gem from its repository
by adding:

```ruby
gem "gitlab-sdk", gitlab: "gitlab-org/analytics-section/product-analytics/gl-application-sdk-rb"
```

As with the `github:` shorthand, a supplied string with no `/` will be
interpreted as `example/example`.

Also in keeping with the utility of the `github:` shorthand, the new
`gitlab:` shorthand also supports Merge Request URLs.

```ruby
gem "gitlab-sdk", gitlab: "https://gitlab.com/gitlab-org/analytics-section/product-analytics/gl-application-sdk-rb/-/merge_requests/27"
```

The `gitlab:` gem source shortcut is modeled on the existing `github:`
shortcut, so the new specs mimic the existing examples.

https://github.com/rubygems/rubygems/commit/f4399018c0
2024-02-16 04:53:14 +00:00
Cody Cutrer fa334ecd40 [rubygems/rubygems] use full path for instance_eval
so that __dir__ and __FILE__ will work properly from within that gemfile
fragment, if eval_gemfile is given a relative path

https://github.com/rubygems/rubygems/commit/d521bf9790
2024-02-15 20:26:03 +00:00
Hiroshi SHIBATA 18da80e100 Skip failing examples at Ruby 3.2+ 2024-02-15 20:34:52 +09:00
Hiroshi SHIBATA 4aef875205 Surpressing constant redefinition warning 2024-02-15 20:34:52 +09:00
Hiroshi SHIBATA 1e426bd5e5 Exclude net-ftp examples because it has dependency issue 2024-02-15 20:34:52 +09:00
Hiroshi SHIBATA 8ba053d3fb Re-enabled old bundled gems 2024-02-15 20:34:52 +09:00
Yusuke Endoh 8f2c231642 ruby-spec: Accept the receiver in backtraces 2024-02-15 19:11:58 +09:00
Hiroshi SHIBATA 4a00fcbd92 Rename and restructured net/ftp and net/http examples 2024-02-15 18:57:23 +09:00
Hiroshi SHIBATA fa7529afd5 Move examples related core extension feature by Bigdecimal to under the library/bigdecimal 2024-02-15 18:57:23 +09:00
Hiroshi SHIBATA 121dfb38be Surpressing constant redefinition warning 2024-02-15 18:57:23 +09:00
Hiroshi SHIBATA 1e6fffaeeb Added new ruby/spec task for bundled gems 2024-02-15 18:57:23 +09:00
Hiroshi SHIBATA 76d322b5d2 Disable to run for bundled gems in test-spec 2024-02-15 18:57:23 +09:00
Yusuke Endoh 92eab382e4 Update the error message format in bundler 2024-02-15 18:42:31 +09:00
Yusuke Endoh 8259f35adc ruby-spec: Accept both a backtick and a single quote in error messages 2024-02-15 18:42:31 +09:00
Benoit Daloze d24be39d69 Only check constant leaks by default for `make test-spec`
* See https://github.com/ruby/ruby/pull/9548
2024-02-15 07:44:03 +09:00
Jean Boussier de1a586ecc proc.c: get rid of `CLONESETUP`
[Bug #20253]

All the way down to Ruby 1.9, `Proc`, `Method`, `UnboundMethod`
and `Binding` always had their own specific clone and dup routine.

This caused various discrepancies with how other objects behave
on `dup` and `clone. [Bug #20250], [Bug #20253].

This commit get rid of `CLONESETUP` and use the the same codepath
as all other types, so ensure consistency.

NB: It's still not accepting the `freeze` keyword argument on `clone`.

Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>
2024-02-12 18:31:48 +01:00
Benoit Daloze ffe1a68bda Skip spec failing on i686 2024-02-12 11:33:08 +01:00
Benoit Daloze d15301d482 Exclude a problematic spec when run in CRuby via make test-spec until fixed 2024-02-12 11:05:51 +01:00
Benoit Daloze b19d2409be Update to ruby/spec@ce834ad 2024-02-12 10:56:33 +01:00
David Rodriguez a35cade791
[rubygems/rubygems] Improve assertion
https://github.com/rubygems/rubygems/commit/7f2f2b898c

Co-authored-by: Martin Emde <martin.emde@gmail.com>
2024-02-08 14:43:56 +09:00
David Rodriguez 0c71fb4b86
[rubygems/rubygems] Run definition specs in an isolated location
And consistently pass Pathname's to `Definition.new` like production
code does.

https://github.com/rubygems/rubygems/commit/660def5b68
2024-02-08 14:43:56 +09:00
David Rodriguez 5500f880f3
[rubygems/rubygems] Fix incorrect 4th parameter to Definition.new
https://github.com/rubygems/rubygems/commit/54948e428d
2024-02-08 14:43:56 +09:00
David Rodriguez e04120772b
[rubygems/rubygems] Move `subject` to top level context
https://github.com/rubygems/rubygems/commit/331c415af0
2024-02-08 14:43:56 +09:00
David Rodríguez 24d5e7176e
[rubygems/rubygems] Refactor lockfile generation
https://github.com/rubygems/rubygems/commit/6a0c03c77f
2024-02-08 14:43:56 +09:00
Benoit Daloze 40642cd3bc Update to ruby/spec@3fc4444 2024-02-05 16:29:57 +01:00
Benoit Daloze abe07d4bf5 Update to ruby/mspec@31f51e0 2024-02-05 16:29:56 +01:00
Benoit Daloze d9bd64f9ee Fix typo 2024-02-05 16:29:25 +01:00
David Rodriguez a4e4e3b1f1 [rubygems/rubygems] Add missing Windows job
Specs that use extension gems were failing in the new job but I noticed
that they were using very non standard `extconf.rb` files.

The hack being removed here was added just to make specs pass when run
in ruby-core but it seems the underlying issue has been fixed now, and
it's causing issues with Ruby 3.3 and Windows, so necessary so I'm
removing it and moving on.

https://github.com/rubygems/rubygems/commit/5b78275f0e
2024-02-02 11:43:10 +00:00
David Rodriguez 95c9711d6e [rubygems/rubygems] Fix musl platform not being added to the lockfile
https://github.com/rubygems/rubygems/commit/235f7b4266
2024-01-31 19:07:39 +00:00
David Rodriguez a322b2faa4 [rubygems/rubygems] Make slow perf specs more stable
This seems worse to detect performance regressions, but at least should
not have many false positives.

https://github.com/rubygems/rubygems/commit/0b28e55415
2024-01-31 13:22:38 +00:00
David Rodriguez 171d4bec25 [rubygems/rubygems] Fix some flaky test failures on Windows
Some specs assert empty output, but sometimes they print warnings about
redefinition warnings. Ignore those until they are fixed upstream.

https://github.com/rubygems/rubygems/commit/0cd3b6dbae
2024-01-31 12:14:03 +00:00