Unreachable code path in Fiddle::ValueUtil#wrap_arg
还没有人认领这个 Issue。
评估
调研方向
从 lib/fiddle/value.rb 中的 Fiddle::ValueUtil#wrap_arg 开始,尤其查看 issue 中链接的第 95-106 行。跟踪 Array 和 TYPE_CHAR 分支,以确认不可达条件和未定义的 val,然后确定是否应删除第 100-103 行;完成的标准是解决死路径,同时不改变有效参数的包装。
由索引模型根据 Issue 内容生成。
描述
In Fiddle::ValueUtil#wrap_arg there is a long case-when for arg with an unreachable code path.
When arg and ty are of Array type, and ty[0] is TYPE_CHAR, there is another condition, for arg to be String at Line 101.
Even if this condition is fixed, val is undefined at Line 102 for this method.
https://github.com/ruby/fiddle/blob/04238cefed14a433f93909bd93dbe1d0a4efc47e/lib/fiddle/value.rb#L95-L106
Should Lines 100-103 be removed?
- 主要语言
- Ruby
- 星标
- 195
- 派生
- 53
- 平均合并
- 23 小时 57 分钟
- 30 天内合并 PR
- 1
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ruby/fiddle 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 52/100
-
难度 3/5 1-2 天 新手友好度 68/100
-
难度 5/5 一周以上 新手友好度 30/100
-
难度 2/5 1-3 小时 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 25/100
相似的 Issue
-
SyncEm always forwards a dummy block, so wrapped methods lose their no-block/Enumerator behavior 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
endoflife-date/endoflife.date#11086 ·
-
internal
难度 1/5 1 小时以内 新手友好度 88/100
Kong/developer.konghq.com#7322 ·
-
bug P2
难度 2/5 1-3 小时 新手友好度 88/100