]> git.draconx.ca Git - homepage.git/commitdiff
Fix compiled_content filter on Ruby 3.
authorNick Bowler <nbowler@draconx.ca>
Sat, 1 Apr 2023 21:50:48 +0000 (17:50 -0400)
committerNick Bowler <nbowler@draconx.ca>
Sat, 1 Apr 2023 21:50:48 +0000 (17:50 -0400)
It is apparently now required to use ** when passing a hash to a
function that takes keyword arguments.

lib/compiledcontent.rb

index 016ed23d0729cb7d469d57fa605c1a54ae36f5ad..80e79113495f01acc7dd60da8ab7f2cd159c4b1b 100644 (file)
@@ -1,7 +1,7 @@
 # Nick's web site: compiled_content filter.  Simply calls the compiled_content
 # method on the current item to retrieve the text from a named rep or snapshot.
 #
-# Copyright © 2022 Nick Bowler
+# Copyright © 2022-2023 Nick Bowler
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,6 +20,6 @@ class CompiledContentFilter < Nanoc::Filter
     identifier :compiled_content
 
     def run(content, params = {})
-        return @item.compiled_content(params)
+        return @item.compiled_content(**params)
     end
 end