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

Fixed compatibility error with setup command and RDoc plugin on RubyGems #12330

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

hsbt
Copy link
Member

@hsbt hsbt commented Dec 13, 2024

@mterada1228 @kou After merging ruby/rdoc#1171, RubyGems tests are broken.

TestGemCommandsSetupCommand#test_execute_regenerate_plugins_creates_plugins_dir_if_not_there:
ArgumentError: wrong number of arguments (given 3, expected 1)
    /Users/hsbt/Documents/github.com/ruby/ruby/lib/rdoc/rubygems_hook.rb:277:in 'initialize'
    /Users/hsbt/Documents/github.com/ruby/ruby/lib/rubygems/commands/setup_command.rb:338:in 'Class#new'
    /Users/hsbt/Documents/github.com/ruby/ruby/lib/rubygems/commands/setup_command.rb:338:in 'Gem::Commands::SetupCommand#install_rdoc'
    /Users/hsbt/Documents/github.com/ruby/ruby/lib/rubygems/commands/setup_command.rb:178:in 'Gem::Commands::SetupCommand#execute'
    /Users/hsbt/Documents/github.com/ruby/ruby/test/rubygems/test_gem_commands_setup_command.rb:113:in 'TestGemCommandsSetupCommand#test_execute_regenerate_plugins_creates_plugins_dir_if_not_there'

First, setup_command calls Gem::RDoc.generate directlry in that methods. I expand to argument of RubygemsHook.new and added RubygemsHook#generate for that.

Second, test/rubygems/test_gem_rdoc.rb also uses Gem::RDoc. I added select condition of Gem::RDoc and RDoc::RubyGemshook for that.

@hsbt hsbt enabled auto-merge (rebase) December 13, 2024 06:09
@hsbt
Copy link
Member Author

hsbt commented Dec 13, 2024

@mterada1228 @kou I'm not sure this is best way to fix with the current issue. Could you also confirm this? After that, I'll pick this change to ruby/rdoc.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

Sorry for missing this case.

@hsbt hsbt merged commit e91b25e into ruby:master Dec 13, 2024
76 checks passed
@hsbt
Copy link
Member Author

hsbt commented Dec 13, 2024

Thank you for confirming this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants