Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ToRdoc#accept_table #1184

Merged
merged 1 commit into from
Oct 3, 2024
Merged

Fix ToRdoc#accept_table #1184

merged 1 commit into from
Oct 3, 2024

Conversation

tompng
Copy link
Member

@tompng tompng commented Sep 30, 2024

Document of Integer#ceil in ruby 3.4.0dev have table. RDoc fails to show tables in text format.

Fix ri Integer#ceil

# ruby -v
ruby 3.4.0dev (2024-09-27T17:45:22Z master 027ef60500) +PRISM [x86_64-linux]
# ri Integer#ceil
/opt/ruby/lib/ruby/3.4.0+0/rdoc/markup/to_rdoc.rb:265:in 'Array#zip': wrong argument type NilClass (must respond to :each) (TypeError)

    @res << header.zip(widths, aligns) do |h, w, a|

Fix IRB crash

irb(main):001> 1.[TAB][TAB]
/opt/ruby/lib/ruby/3.4.0+0/rdoc/markup/to_rdoc.rb:265:in 'Array#zip': wrong argument type NilClass (must respond to :each) (TypeError)

@colby-swandale
Copy link
Member

Could we separate the various fixes into their own commits, it would make reviewing each fix much easier

@tompng tompng force-pushed the fix_to_rdoc_table branch from 3c17d05 to f5a67bd Compare October 1, 2024 16:47
@tompng
Copy link
Member Author

tompng commented Oct 1, 2024

Could we separate the various fixes into their own commits

I removed The change to lib/rdoc/markup/to_tt_only.rb that adds alias accept_table do_nothing.
Now this pull request only contain one fix: ToRdoc#accept_table. This single fix will solve both ri Integer#ceil crash and irb completion crash which is the same cause.

@st0012 st0012 added the bug label Oct 1, 2024
Copy link
Member

@st0012 st0012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍

@st0012 st0012 merged commit 7b68545 into ruby:master Oct 3, 2024
26 checks passed
matzbot pushed a commit to ruby/ruby that referenced this pull request Oct 3, 2024
@tompng tompng deleted the fix_to_rdoc_table branch October 3, 2024 12:52
@st0012 st0012 added this to the v6.8.0 milestone Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants