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

Support for Java classes in JRuby

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
32/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
java, ruby
领域
documentation

调研方向

首先检查链接的补丁以及 RDoc 中现有的 ri 处理方式。确定如何在不使用插件的情况下集成 --java/-j 选项和 JRuby 运行时反射。完成标准是 JRuby 可以通过 ri 显示 Java 类的方法和参数类型,并为新行为提供测试覆盖。

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

描述

I was recently reminded of a patch I threw together 15 years ago to support documenting Java classes with ri in JRuby. Today I found that patch:

https://gist.github.com/headius/276803

This is a very loose concept based on rdoc from 2010, but the logic should still work today. When the --java or -j flag is passed, instead of using the usual stores for docs, we use runtime reflection to load the class and method(s) in question. The compiled code available at runtime does not have text documentation, but we can still display the method names and argument types, which would be a big help for JRuby users.

As this is very specific to JRuby, I wanted to ask how we might get an updated version of this patch integrated. I could not see a good way to do a JRuby-specific plugin, but I have not dug very deep.

It could also simply be added as a feature that is only available when running on JRuby.

An example of the output:

~/projects/jruby ➔ ri -j java.lang.Object
------------------------------------------------ Class: java.lang.Object
     (no description...)
------------------------------------------------------------------------


Instance methods:
-----------------
     equals, getClass, hashCode, notify, notifyAll, toString, wait

~~/projects/jruby ➔ ri -j java.lang.String.split
------------------------------------------------- java.lang.String#split
     split(java.lang.String,int) => java.lang.String[]
     split(java.lang.String) => java.lang.String[]
------------------------------------------------------------------------
     (no description...)
主要语言
Ruby
星标
927
派生
467
平均合并
23 小时 47 分钟
30 天内合并 PR
12

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

ruby/rdoc 的其他 Issue

查看 ruby/rdoc 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

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