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

3233 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA 716473e348 Use load_gemspec instead of Gem::Specification.load.
We need to purge `git ls-files` from gemspec in default gems.
2024-05-28 13:30:26 -07:00
David Rodriguez 1849046d1f Consider extensions in gems outside of ext/ 2024-05-28 13:30:26 -07:00
David Rodriguez e60ad0b6f5 Extract `root` helper
It holds the root directory for each type of default gem (ext/ or lib/).
2024-05-28 13:30:26 -07:00
David Rodriguez 642cf3fc8a Consider `target_prefix` in extension Makefiles 2024-05-28 13:30:26 -07:00
David Rodríguez 57b56225ac Consistently put requirable features in default gemspecs file list 2024-05-28 13:30:26 -07:00
David Rodríguez 7ff330419f Fix gemspec file list for extension gems
So that it also includes requirable features provided by extensions.
2024-05-28 13:30:26 -07:00
David Rodriguez a63114323b Simplify FileCollector interface 2024-05-28 13:30:26 -07:00
David Rodriguez e43393ac0f Use `$ext_build_dir` consistently
Instead of hardcoded "ext".
2024-05-28 13:30:26 -07:00
Eugene Kenny 6edd65a080 [Bug #20450] Remove rubyarchdir from bootsnap paths 2024-05-28 13:29:22 -07:00
Hiroshi SHIBATA 718a78cdf5 Added test case for bundled gems warning with -r option.
This is for 76914d474d
2024-05-28 13:29:22 -07:00
Hiroshi SHIBATA a121e69840 Bootsnap and Zeitwerk are working correctly now 2024-05-28 13:29:22 -07:00
Hiroshi SHIBATA edebbade1b Add newline each test script 2024-05-28 13:29:22 -07:00
Hiroshi SHIBATA 178de0e953 Added test script for bundled_gems.rb with zeitwerk 2024-05-28 13:29:22 -07:00
Hiroshi SHIBATA 7227b859a7
Merge RubyGems 3.5.9 and Bundler 2.5.9 (Fixed CI at Ruby 3.3) (#10348)
* Merge RubyGems-3.5.6 and Bundler-2.5.6

* Merge RubyGems-3.5.7 and Bundler-2.5.7

* Merge RubyGems-3.5.8 and Bundler-2.5.8

* Partly reverted about https://github.com/rubygems/rubygems/pull/7483

* Merge RubyGems-3.5.9 and Bundler-2.5.9
2024-04-16 02:22:22 +00:00
Hiroshi SHIBATA ac526abcd6
Merge RubyGems 3.5.5 and Bundler 2.5.5 (#9676)
* Merge RubyGems-3.5.4 and Bundler-2.5.4

* Merge RubyGems-3.5.5 and Bundler-2.5.5

* Make tests play with upstream Ruby tests

CI broke in https://github.com/ruby/ruby/pull/9604 because if any Ruby
tests run `require 'net/http'`, they will pollute the
`$LOADED_FEATURES` for the RubyGems tests. We can fix this by renaming
the test default gem from `net-http` to `my-http`.

See https://github.com/rubygems/rubygems/pull/7379#issuecomment-1901241299
for more details.

---------

Co-authored-by: Stan Hu <stanhu@gmail.com>
2024-02-05 14:51:04 +00:00
NARUSE, Yui ce6863a0cf
merge revision(s) 18573b8d054f655e3e8b24902985bf4028f88810: [Backport #20178] (#9822)
Avoid reading unused lvars in Primitive.cexpr

	Previously on builds with optimizations disabled, this could result in
	an out of bounds read. When we had all of:
	* built with -O0
	* Leaf builtin
	* Primitive.mandatory_only
	* "no args builtin", called by vm_call_single_noarg_inline_builti
	* The stack is escaped to the heap via binding or a proc

	This is because mk_builtin_loader generated reads for all locals
	regardless of whether they were used and in the case we generated a
	mandatory_only iseq that would include more variables than were actually
	available.

	On optimized builds, the invalid accesses would be optimized away, and
	this also was often unnoticed as the invalid access would just hit
	another part of the stack unless it had been escaped to the heap.

	The fix here is imperfect, as this could have false positives, but since
	Primitive.cexpr! is only available within the cruby codebase itself
	that's probably fine as a proper fix would be much more challenging (the
	only false positives we found were in rjit.rb).

	Fixes [Bug #20178]

	Co-authored-by: Adam Hess <HParker@github.com>
	---
	 bootstraptest/test_method.rb | 9 +++++++++
	 tool/mk_builtin_loader.rb    | 6 ++++++
	 2 files changed, 15 insertions(+)
2024-02-04 04:13:15 +00:00
NARUSE, Yui f585171a6b merge revision(s) e12d4c654e3cb7a4473014610bc3bae41aaf811e: [Backport #20104]
Don't create T_MATCH object if /regexp/.match(string) doesn't match

	Fixes [Bug #20104]
	---
	 re.c                     |  9 ++++++---
	 test/ruby/test_regexp.rb | 12 ++++++++++++
	 tool/lib/envutil.rb      |  8 ++++++++
	 3 files changed, 26 insertions(+), 3 deletions(-)
2024-01-30 20:29:02 +09:00
Hiroshi SHIBATA 27ead9907d
Typofix under lib and test, tool directories 2023-12-25 11:32:42 +09:00
Takashi Kokubun c25705c267 Get rid of obsoleted RJITFirst
It was renamed from test_mjit, but we did not maintain it as test_rjit.
We test RJIT very differently.
2023-12-22 20:20:42 -08:00
Takashi Kokubun 19d082dcfa RJIT: Distinguish Pointer with Array
This is more convenient for accessing those fields.
2023-12-22 11:24:04 -08:00
Jeremy Evans 7dca6b53a9
Add tool/missing-baseruby.bat, used when BASERUBY not available
Previously, the embedded semicolon in BASERUBY if BASERUBY is
not available breaks tarball builds without BASERUBY when using
OpenBSD make, due to the inability to escape MFLAGS correctly.
This moves the same BASERUBY code into a separate file, avoiding
the MFLAGS quoting issue.

BASERUBY must be passed to build-ext because it is required
by ripper since the introduction of lrama.

Fixes [Bug #19683]

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-12-19 21:30:47 -08:00
Peter Zhu 32ecda354f Support `GC.auto_compact = :empty` on debug builds
This commit adds `GC.auto_compact = :empty` which will run
auto-compaction sorting pages by empty slots so the most amount of
objects will be moved. This will make it easier to write tests for
auto-compaction.
2023-12-19 18:29:36 -05:00
Takashi Kokubun eb872d1752 RJIT: Share rb_vm_insns_count for vm_insns_count 2023-12-18 23:55:40 -08:00
Hiroshi SHIBATA ad2a38dce4
Added simple test script 2023-12-16 16:36:47 +08:00
Hiroshi SHIBATA 6f6b36b7e4
Added test for sub-feature like bigdecimal/util 2023-12-16 15:44:34 +08:00
Hiroshi SHIBATA dd49ee152b
Use minimum arguments for Bootsnap 2023-12-16 14:41:43 +08:00
David Rodríguez d5af5a48a5
Fix Sinatra warning during specs
Some specs now print the following warning:

```
/path/to/bundler/tmp/1/gems/base/ruby/3.2.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:902: warning: constant Tilt::Cache is deprecated
```

Updating sinatra to latest & greatest fixes it.

Update other deps too since at it.
2023-12-16 10:09:50 +08:00
Samuel Giddins ca7f7c0f51 [rubygems/rubygems] Refactor vendoring to allow validating vendoring is reproducible
Helps ensure that unsuspecting diffs to the vendored code arent accidentally introduced

https://github.com/rubygems/rubygems/commit/7c425d49dd
2023-12-15 14:48:25 +00:00
Nobuyoshi Nakada 7cbc08b388 Follow removed conflict files
After editing a conflict, continue without removed files.
2023-12-15 22:37:38 +09:00
Nobuyoshi Nakada 4d5bfa7c3b
Ignore the spcial case of target_cpu
On Windows, x86_64 is called as x64.
2023-12-15 15:39:14 +09:00
Nobuyoshi Nakada 2c2c6bc3fa
Fix `ARCH_FLAG` when cross-compiling on macOS 2023-12-15 15:19:16 +09:00
Nobuyoshi Nakada 1e5c4026d5
Fix `ARCH_FLAG` when `--with-arch` with single CPU 2023-12-15 14:10:02 +09:00
Hiroshi SHIBATA cc9aeec23e
Explained about test_for_warn_bundled_gems 2023-12-15 14:14:48 +08:00
git 202c608248 * append newline at EOF. [ci skip] 2023-12-15 06:05:41 +00:00
Hiroshi SHIBATA 8df46d54bf
Added test case of dash gem like net-smtp 2023-12-15 14:05:13 +08:00
Hiroshi SHIBATA 9a204fb82e
Added test case of bootsnap 2023-12-15 14:05:13 +08:00
Hiroshi SHIBATA 25a133ba17
Added test case of bundle exec 2023-12-15 14:05:13 +08:00
Hiroshi SHIBATA 66b82a4430
Added test case of bundled gems dependencies 2023-12-15 14:05:13 +08:00
Hiroshi SHIBATA 76c1ce4e37
Added basic test case of bundled gems warning 2023-12-15 14:05:13 +08:00
Jeremy Evans c42e4a38e9 Fix tool/ln_sr.rb passing 2 arguments to String#chomp!
I'm guessing String#sub! was desired here.
2023-12-13 07:05:21 -08:00
David Rodríguez 6b3c9cebe9 Normalize bundler bindir
This makes bundler consistent with all other gems, and makes the default
installation of Bundler in the release package look like any other
bundler installation.

Before (on preview3, for example), Bundler executable is installed at:

lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/libexec/bundle

Now it's installed in the standard location:

lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/exe/bundle
2023-12-13 12:59:23 +09:00
David Rodríguez 1572322e17
Sync with upstream rubygems (#9206) 2023-12-12 11:49:25 -08:00
Takashi Kokubun fd7decbf04 Allow syncing tool/bundler 2023-12-12 11:19:02 -08:00
NARUSE, Yui 6b3abcf462 fix regexp pattern of diff 2023-12-12 11:22:40 +09:00
David Rodríguez 8c2480c9ed
Unlock tilt since we no longer support Ruby 2.6 2023-12-12 10:04:57 +09:00
Kazuhiro NISHIYAMA 9765ada69c Fix NoMethodError on fail
```
.../tool/lib/colorize.rb:56:in `resolve_color': undefined method `gsub' for an instance of Symbol (NoMethodError)

    color.gsub(/\b[a-z][\w ]+/) do |n|
	 ^^^^^
	from .../tool/lib/colorize.rb:47:in `decorate'
	from .../tool/lib/test/unit.rb:1012:in `block in failed'
```
2023-12-12 09:14:11 +09:00
Nobuyoshi Nakada d9dbcd848f
Add bright colors and multiple attributes [ci skip]
Not only:
```
$ ruby colorize.rb fail foo
```

Also:
```
$ ruby colorize.rb 'bright_blue;bold' foo
```
2023-12-10 20:43:47 +09:00
Nobuyoshi Nakada 0096d6a809
Extract configuration and lookup methods [ci skip] 2023-12-10 20:43:44 +09:00
Hiroshi SHIBATA f2c84c4884 Pick commit from https://github.com/rubygems/rubygems/pull/7085
Co-authored-by: Samuel Giddins <segiddins@segiddins.me>
2023-12-08 16:01:01 +09:00
Hiroshi SHIBATA dab30b4d71 Pick commit from https://github.com/rubygems/rubygems/pull/7227
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2023-12-08 16:01:01 +09:00