Skip to content
This repository has been archived by the owner on Feb 12, 2021. It is now read-only.

Ide_Prefs is Broken for Ruby 3.0 #84

Open
ericadohring opened this issue Dec 31, 2020 · 1 comment
Open

Ide_Prefs is Broken for Ruby 3.0 #84

ericadohring opened this issue Dec 31, 2020 · 1 comment

Comments

@ericadohring
Copy link

ericadohring commented Dec 31, 2020

Ruby 3 sunsetted using the last argument as keyword parameters which breaks our ide_prefs script (specifically, lines 56 and 67)

/Users/pivotal/workspace/pivotal_ide_prefs/cli/lib/cli/configuration/repo_configuration.rb:4:in `initialize': wrong number of arguments (given 1, expected 0) (ArgumentError)
	from ./bin/ide_prefs:56:in `new'
	from ./bin/ide_prefs:56:in `<main>'
/Users/pivotal/workspace/pivotal_ide_prefs/ide_prefs/lib/ide_prefs/commands/install_prefs.rb:4:in `initialize': wrong number of arguments (given 1, expected 0) (ArgumentError)
	from ./bin/ide_prefs:67:in `new'
	from ./bin/ide_prefs:67:in `<main>'

As the docs recommended, prefacing with double splat seems to fix things. I can't yet open a PR (waiting on maintainer access), but hopefully this helps unblock folks in the meantime.

-repo_configuration = Cli::Configuration::RepoConfiguration.new(repo_config_options)
+repo_configuration = Cli::Configuration::RepoConfiguration.new(**repo_config_options)

and

-Cli::CommandFactory.new(ARGV.last).command.new(repos).execute
+Cli::CommandFactory.new(ARGV.last).command.new(**repos).execute
@ericadohring ericadohring changed the title Ruby Keyword Parameters Sunsetted in Ruby 3.0 Ide_Prefs is Broken for Ruby 3.0 Dec 31, 2020
@infews
Copy link
Contributor

infews commented Feb 11, 2021

@professor can you please transfer this issue to the new repo?

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

No branches or pull requests

2 participants