2342 Commits

Author SHA1 Message Date
Hiroshi SHIBATA
c51e37e8ec Disable git background maintenance in bundler specs
Since Git 2.46, commands like `git commit` spawn a detached
`git maintenance run --auto` process, which briefly creates
`.git/objects/maintenance.lock`. Specs copying a just-committed
repository with FileUtils.cp_r can hit the lock file disappearing
between readdir and lstat, causing flaky Errno::ENOENT failures on
macOS CI runners with newer Git.

https://github.com/ruby/ruby/actions/runs/28764006107/job/85284933867

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 10:26:27 +09:00
Hiroshi SHIBATA
46194e291c [ruby/syntax_suggest] Resolve to lint failure of standardrb
https://github.com/ruby/syntax_suggest/commit/ce7b87184e
2026-03-23 11:00:31 +09:00
Hiroshi SHIBATA
847413d15e [ruby/syntax_suggest] Make benchmark exapmles as optional
https://github.com/ruby/syntax_suggest/commit/ea73ed586a
2026-03-23 11:00:31 +09:00
Schneems
a0fd8328b7 [ruby/syntax_suggest] Fix missing line break due to puts logic
In #225 it was reported that the output looks incorrect:

```
$ cat /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
def x.y.z
end
$ ruby /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
/tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb: --> /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
expected a delimiter to close the parametersunexpected '.', ignoring it
> 1  def x.y.z
> 2  end
```

Specifically:

```
expected a delimiter to close the parametersunexpected '.', ignoring it
```

However this does not show up when executing the debug executable:

```
$ bin/bundle exec exe/syntax_suggest /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
--> /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb

expected a delimiter to close the parameters
unexpected '.', ignoring it

> 1  def x.y.z
> 2  end
```

This is because `exe/syntax_suggest` uses STDOUT.puts while calling `ruby` with the filename uses a fake IO object represented by MiniStringIO. This class was incorrectly not adding a newline to the end of the print.

The fix was to move the class to it's own file where it can be tested and then fix the behavior.

close https://github.com/ruby/syntax_suggest/pull/225

https://github.com/ruby/syntax_suggest/commit/d2ecd94a3b

Co-authored-by: Andy Yong <andyywz@gmail.com>
2026-03-23 11:00:31 +09:00
Mike Dalessio
b952b6f099 Fix UnboundMethod#== for methods from included/extended modules [Backport #21873]
Method#unbind clones the method entry, preserving its defined_class.
For methods mixed in via include/extend, defined_class is an ICLASS,
causing UnboundMethod#== to return false when comparing against the
same method obtained via Module#instance_method.

Resolve ICLASS defined_class in method_eq.

[Bug #21873]
2026-02-12 15:05:36 +09:00
Hiroshi SHIBATA
d69dff1d7d macOS 15 is the stable version today 2025-12-15 17:38:38 +09:00
Hiroshi SHIBATA
c98aa9771e Pend some tests because these are not working with macOS 15 beta and Xcode 16 beta 2025-12-15 17:38:38 +09:00
nagachika
c4b8891554 merge revision(s) c5bd4acd30320a8e180ce9fcb24acdab4e10c73a: [Backport #21666]
[PATCH] [Bug #21666] Get rid of use of unspecified values
2025-11-29 12:31:08 +09:00
Hiroshi SHIBATA
7a197de7ae Fix tests to verify basic authentication 2025-10-09 23:08:48 +09:00
nagachika
e39a0a19c0 merge revision(s) ce849d565bf6aae8e0179fffb04eb1f665f17347, acb29f7fa1497463ed3bdd65549ef20b61beda64: [Backport #21402]
ruby2_keywords warnings: Quote non-UTF8 method names fully

	It used to quote only part of the method name because NUL byte in
	the method terminates the C string:

	```
	(irb)> "abcdef".encode("UTF-16LE").bytes
	=> [97, 0, 98, 0, 99, 0, 100, 0, 101, 0, 102, 0]
	```

	```
	expected: /abcdef/
	actual: warning: Skipping set of ruby2_keywords flag for a (method not defined in Ruby)\n".
	```

	Do not respect ruby2_keywords on method/proc with post arguments

	Previously, ruby2_keywords could be used on a method or proc with
	post arguments, but I don't think the behavior is desired:

	```ruby
	def a(*c, **kw) [c, kw] end
	def b(*a, b) a(*a, b) end
	ruby2_keywords(:b)

	b({foo: 1}, bar: 1)
	```

	This changes ruby2_keywords to emit a warning and not set the
	flag on a method/proc with post arguments.

	While here, fix the ruby2_keywords specs for warnings, since they
	weren't testing what they should be testing.  They all warned
	because the method didn't accept a rest argument, not because it
	accepted a keyword or keyword rest argument.
2025-09-14 12:47:12 +09:00
nagachika
f4de78f2b4 merge a revision partially 097d742a1ed53afb91e83aef01365d68b763357b: [Backport #20009] 2025-07-20 10:35:44 +09:00
nagachika
581be2b79c merge revision(s) 097d742a1ed53afb91e83aef01365d68b763357b: [Backport #20009]
[Bug #20009] Support marshaling non-ASCII name class/module
2025-07-19 11:16:49 +09:00
Hiroshi SHIBATA
6ca52090ed Remove hardcoded version of rake from Bundler tests
The original commit is 85f73e42a5
2025-06-03 10:12:43 +09:00
nagachika
8a1d738b80 merge revision(s) 3113bc8d445c4c24ed3827adfc50bb88c99b6364:
stat command is not provided on Windows
2025-05-18 10:24:11 +09:00
Nobuyoshi Nakada
1c68aae91f Check LoadError first
The message from dlerror is not our concern.
2025-05-06 14:06:40 +09:00
Hiroshi SHIBATA
54950b1f7c Added assertion strings with Xcode 16.3 beta 2025-05-06 14:06:40 +09:00
nagachika
aac5c546cd merge revision(s) f69ad0e810e1fdc18dc12f77bbecfa49999ef3bf: [Backport #21094]
[Bug #21094] Update nested module names when setting temporary name
2025-03-29 16:49:59 +09:00
nagachika
fff5baf200 merge revision(s) 46b544c54955348ef1ea9692b837b061f59f91cd, d3abee739f4feb91bb9aaae33877d70c8c576db0: [Backport #21095]
Prefer `uname -n` over `hostname`. (#12647)

	Add fallback for `hostname` if `uname` isn't available. (#12655)
2025-03-08 18:19:14 +09:00
Hiroshi SHIBATA
c4b6ce3675 Merge syntax-suggest-2.0.1 2024-10-21 08:41:50 -07:00
Hiroshi SHIBATA
494fcc507b Merge RubyGems-3.5.22 and Bundler-2.5.22 2024-10-17 08:55:01 -07:00
Hiroshi SHIBATA
d03e4228aa Merge RubyGems-3.5.21 and Bundler-2.5.21 2024-10-17 08:55:01 -07:00
Hiroshi SHIBATA
77fb1bf434 Merge RubyGems-3.5.20 and Bundler-2.5.20 2024-09-25 10:56:17 -07:00
Hiroshi SHIBATA
3894841182 Merge RubyGems-3.5.19 and Bundler-2.5.19 2024-09-25 10:56:17 -07:00
Hiroshi SHIBATA
ef3c4a7aa7 Merge RubyGems-3.5.18 and Bundler-2.5.18 2024-09-25 10:56:17 -07:00
Hiroshi SHIBATA
95f72a4a32 Merge RubyGems-3.5.17 and Bundler-2.5.17 2024-09-25 10:56:17 -07:00
Hiroshi SHIBATA
f85c7deacc
Update RubyGems 3.5.16 and Bundler 2.5.16 for Ruby 3.3 (#11252)
* Merge RubyGems-3.5.12 and Bundler-2.5.12

* Merge RubyGems-3.5.13 and Bundler-2.5.13

* Merge RubyGems-3.5.14 and Bundler-2.5.14

* Merge RubyGems-3.5.15 and Bundler-2.5.15

* Merge RubyGems-3.5.16 and Bundler-2.5.16
2024-07-30 09:05:54 -07:00
Peter Zhu
4c50d23245
Raise SyntaxError on invalid encoding symbol (#10967)
[Bug #20280]

Backport of #10014.
2024-06-11 11:01:29 -07:00
Hiroshi SHIBATA
06f470ce66
Merge RubyGems 3.5.11 and Bundler 2.5.11 for Ruby 3.3 (#10870)
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2024-06-04 21:36:46 -07:00
Takashi Kokubun
ea196a3c9f merge revision(s) be7c91db44d6b8dba8fa11ff782965b4bfa0b3c8: [Backport #20515]
Do not pollute toplevel namespace
2024-05-30 14:53:54 -07:00
Takashi Kokubun
5c06e93074 merge revision(s) 6ade36c06b7cef948099b8f5f483763498705d12: [Backport #20414]
`Fiber#raise` recursively raises on nested resuming_fiber. (#10482)

	* Improve consistency of `Fiber.current.raise`.
2024-05-29 15:47:26 -07:00
Takashi Kokubun
6e9dbcbacc Force-skip a LOAD_PATH spec for rhel_zlinux 2024-05-29 09:56:55 -07:00
Takashi Kokubun
912c7df0a5 Skip a failing spec for rhel_zlinux
https://rubyci.s3.amazonaws.com/rhel_zlinux/ruby-3.3/log/20240528T214850Z.fail.html.gz

```
1)
Execution variable $: default $LOAD_PATH entries until sitelibdir included have @gem_prelude_index set FAILED
Expected ["/home/chkbuild/build/20240528T214850Z/mspec/lib/mspec/lib",
 "/home/chkbuild/build/20240528T214850Z/mspec/lib",
 "./ruby/tool/lib",
 "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/site_ruby/3.3.0",
 "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/site_ruby/3.3.0/s390x-linux",
 "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/site_ruby",
 "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/vendor_ruby/3.3.0",
 "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/vendor_ruby/3.3.0/s390x-linux",
 "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/vendor_ruby",
 "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/3.3.0",
 "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/3.3.0/s390x-linux"].include? "/home/chkbuild/build/20240528T214850Z/lib/ruby/site_ruby/3.3.0"
to be truthy but was false
/home/chkbuild/build/20240528T214850Z/rubyspec/language/predefined_spec.rb:885:in `block (2 levels) in <top (required)>'
/home/chkbuild/build/20240528T214850Z/rubyspec/language/predefined_spec.rb:846:in `<top (required)>'
```

It does have /home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/site_ruby/3.3.0,
so it seems actually fine. It seems to be failing due to its setup
issues. Skipping this until we figure out how to fix it.
2024-05-28 16:52:29 -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
NARUSE, Yui
a63e979853
merge revision(s) d19d683a354530a27b4cbb049223f8dc70c75849,de1a586ecc2ee7f465f0c0a69291054136a3a819: [Backport #20250] (#10308)
rb_obj_setup: do not copy RUBY_FL_SEEN_OBJ_ID

	[Bug #20250]

	We're seting up a new instance, so it never had an associated
	object_id.

	proc.c: get rid of `CLONESETUP`
	MIME-Version: 1.0
	Content-Type: text/plain; charset=UTF-8
	Content-Transfer-Encoding: 8bit

	[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-03-21 01:45:01 +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
Nobuyoshi Nakada
b641b7e640
Move non-portable pragmas to rubyspec.h
In the extension libraries in spec/ruby/optional/capi, do not care
about deprecated declarations.
2023-12-25 14:11:49 +09:00
Hiroshi SHIBATA
863ded45a1
Typofix under bootstraptest, spec and yjit directories 2023-12-25 13:50:23 +09:00
Nobuyoshi Nakada
fd3dede7f4
Fix for older set versions
`Set::VERSION` was not defined in old set.rb bundled with ruby 3.2 or
earlier.
Also add comment for spec/mspec/tool/remove_old_guards.rb.
2023-12-23 18:57:47 +09:00
Nobuyoshi Nakada
dc7785e16b
Set 1.1 now checks subclass-ness stricter 2023-12-23 18:15:26 +09:00
Hiroshi SHIBATA
7d7a84e99f Merge RubyGems-3.5.3 and Bundler-2.5.3 2023-12-23 09:34:26 +09:00
Koichi Sasada
2fe9e08578 MN: skip RUBY_DESCRIPTION spec on MN enabled 2023-12-23 08:10:41 +09:00
Hiroshi SHIBATA
82496f2b38 Merge RubyGems-3.5.2 and Bundler-2.5.2 2023-12-22 07:24:04 +09:00
Hiroshi SHIBATA
d7d10f3ee8
Adjust rubygems style 2023-12-17 05:45:33 +08:00
Hiroshi SHIBATA
8db0de92a8
Restore tracked_files for ruby core repo 2023-12-17 05:39:16 +08:00
Hiroshi SHIBATA
40113454b1 Use regex instead of hard coded paths 2023-12-16 21:02:45 +09:00
Hiroshi SHIBATA
ab87cd0baa We don't use tracked_files in before(:suite). It breaks with release package. 2023-12-16 21:02:45 +09:00
David Rodríguez
7cd4282cc8 [rubygems/rubygems] Fix Bundler daily CI
A default Bundler copy with vendored net-http is causing a Bundler spec
to end up loading that copy instead of the copy of Bundler under test.
This is because of vcr, but we don't really need vcr in the command
that's failing, so I avoided loading it.

https://github.com/rubygems/rubygems/commit/304ab6e1b9
2023-12-16 10:07:52 +08:00
David Rodríguez
c8e9cd2b8b [rubygems/rubygems] Fix Ruby DSL no longer working as expected
https://github.com/rubygems/rubygems/commit/f6258e5679

Co-authored-by: AndrewSwerlick <andrew.swerlick@gmail.com>
2023-12-16 10:04:38 +08:00
Martin Emde
1cfe874ef8 [rubygems/rubygems] Remove test-only & unused methods from Checksum::Store
https://github.com/rubygems/rubygems/commit/79636dec12
2023-12-15 19:36:24 +00:00
David Rodríguez
d718654bb1
[rubygems/rubygems] Remove extension building sync stuff no longer present in RubyGems
https://github.com/rubygems/rubygems/commit/59a85388b9
2023-12-14 20:22:48 +08:00