Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Windows . new version 0.8.0 don't install on ruby less than 3.4

未关闭
#96 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
c, ruby
领域
backend

调研方向

从 ext/websocket-driver/websocket_mask.c 开始,重点检查 method_websocket_mask 以及它在 Init_websocket_mask 中的注册;在受影响的 Windows Ruby 版本上复现扩展的构建过程。完成标准是 gem 能够在 Ruby 3.1、3.2 和 3.3 上编译并安装,同时仍能在 Ruby 3.4 上安装。

由索引模型根据 Issue 内容生成。

描述

with ruby 3.1.7, 3.2.8, 3.3.8 the gem fail to compile on windows with latest version of ruby installer. All mingw packages are a the latest version.
On ruby 3.4.4 it install correctly.

logs:
`current directory: D:/program/Ruby/Ruby33-x64/lib/ruby/gems/3.3.0/gems/websocket-driver-0.8.0/ext/websocket-driver
D:/program/Ruby/Ruby33-x64/bin/ruby.exe extconf.rb
creating Makefile

current directory: D:/program/Ruby/Ruby33-x64/lib/ruby/gems/3.3.0/gems/websocket-driver-0.8.0/ext/websocket-driver
make DESTDIR= sitearchdir=./.gem.20250525-11528-y6pu5x sitelibdir=./.gem.20250525-11528-y6pu5x clean

current directory: D:/program/Ruby/Ruby33-x64/lib/ruby/gems/3.3.0/gems/websocket-driver-0.8.0/ext/websocket-driver
make DESTDIR= sitearchdir=./.gem.20250525-11528-y6pu5x sitelibdir=./.gem.20250525-11528-y6pu5x
generating websocket_mask-x64-mingw-ucrt.def
compiling websocket_mask.c
websocket_mask.c: In function 'Init_websocket_mask':
websocket_mask.c:31:46: error: passing argument 3 of 'rb_define_singleton_method' from incompatible pointer type [-Wincompatible-pointer-types]
31 | rb_define_singleton_method(Mask, "mask", method_websocket_mask, 2);
| ^~~~~~~~~~~~~~~~~~~~~
| |
| VALUE ()(VALUE, VALUE, VALUE) {aka long long unsigned int ()(long long unsigned int, long long unsigned int, long long unsigned int)}
In file included from D:/program/Ruby/Ruby33-x64/include/ruby-3.3.0/ruby/internal/anyargs.h:76,
from D:/program/Ruby/Ruby33-x64/include/ruby-3.3.0/ruby/ruby.h:27,
from D:/program/Ruby/Ruby33-x64/include/ruby-3.3.0/ruby.h:38,
from websocket_mask.c:1:
D:/program/Ruby/Ruby33-x64/include/ruby-3.3.0/ruby/internal/intern/class.h:365:68: note: expected 'VALUE ()(void)' {aka 'long long unsigned int ()(void)'} but argument is of type 'VALUE ()(VALUE, VALUE, VALUE)' {aka 'long long unsigned int ()(long long unsigned int, long long unsigned int, long long unsigned int)'}
365 | void rb_define_singleton_method(VALUE obj, const char *mid, VALUE(*func)(ANYARGS), int arity);
| ~~~~~~~^~~~~~~~~~~~~~
websocket_mask.c:3:7: note: 'method_websocket_mask' declared here
3 | VALUE method_websocket_mask(VALUE self, VALUE payload, VALUE mask)
| ^~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:248: websocket_mask.o] Error 1

make failed, exit code 2
`
Any idea?

主要语言
Ruby
星标
238
派生
49
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

faye/websocket-driver-ruby 的其他 Issue

查看 faye/websocket-driver-ruby 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。