Skip to content

Commit 27f24a3

Browse files
hsbtclaude
authored andcommitted
[ruby/rubygems] Fix incompatible function pointer type error with Xcode 26.5 beta
Xcode 26.5 beta ships a clang that promotes -Wincompatible-function-pointer-types to an error by default. The test's inline C extension defined `VALUE foo()` (taking no arguments) but passed it to `rb_define_global_function` which expects `VALUE (*)(VALUE)` through Ruby's RBIMPL_ANYARGS dispatch macro. Adding the `VALUE self` parameter fixes the signature mismatch. ruby/rubygems@393490d8a5 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent dd3542a commit 27f24a3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spec/bundler/install/gemfile/git_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@
14041404
File.open(git_reader.path.join("ext/foo.c"), "w") do |file|
14051405
file.write <<-C
14061406
#include "ruby.h"
1407-
VALUE foo() { return INT2FIX(#{i}); }
1407+
VALUE foo(VALUE self) { return INT2FIX(#{i}); }
14081408
void Init_foo() { rb_define_global_function("foo", &foo, 0); }
14091409
C
14101410
end

0 commit comments

Comments
 (0)