Skip to content

Commit

Permalink
Separate Positional and Keyword Arguments
Browse files Browse the repository at this point in the history
In Ruby 3.0, positional arguments and keyword arguments were separated.
In Ruby 3, a method delegating all arguments must explicitly delegate
keyword arguments in addition to positional arguments.

In most cases, we can avoid the incompatibility by adding the double
splat operator. It explicitly specifies passing keyword arguments
instead of a Hash object.

https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
  • Loading branch information
cpfergus1 committed Jan 10, 2023
1 parent cdc5392 commit 659add2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/prependers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def self.setup_for_rails(load_options = {})
config.autoload_paths += prependers_directories

config.to_prepare do
Prependers.load_paths(prependers_directories, load_options)
Prependers.load_paths(prependers_directories, **load_options)
end
end
end
Expand Down

0 comments on commit 659add2

Please sign in to comment.