Skip to content

Fix ToRdoc#accept_table - #1184

Merged
st0012 merged 1 commit into
ruby:masterfrom
tompng:fix_to_rdoc_table
Oct 3, 2024
Merged

st0012 merged 1 commit into
ruby:masterfrom
tompng:fix_to_rdoc_table

Conversation

@tompng

@tompng tompng commented Sep 30, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
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

tompng commented Oct 1, 2024

Copy link
Copy Markdown
Member Author

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

@st0012 st0012 left a comment

Copy link
Copy Markdown
Member

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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants