From d124465bc3a83a614eb10eb7c6d6ddff2fc00f35 Mon Sep 17 00:00:00 2001 From: Ahmed AbdelHalim Date: Fri, 30 Jun 2023 15:31:58 +0200 Subject: Fix ruby 3 incompatible hash params/keywards --- CLI/ruby/lib/game_of_life/generators/input.rb | 2 +- CLI/ruby/lib/game_of_life/generators/seed.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'CLI/ruby/lib') diff --git a/CLI/ruby/lib/game_of_life/generators/input.rb b/CLI/ruby/lib/game_of_life/generators/input.rb index fbe3278..cb35786 100644 --- a/CLI/ruby/lib/game_of_life/generators/input.rb +++ b/CLI/ruby/lib/game_of_life/generators/input.rb @@ -54,7 +54,7 @@ module GameOfLife (0...height).each do |i| (0...width).each do |j| cell = { x: j, y: i, alive: input.fetch(i, nil)&.fetch(j, nil) } - universe[i][j] = ::GameOfLife::Cell.new(cell) + universe[i][j] = ::GameOfLife::Cell.new(**cell) end end universe diff --git a/CLI/ruby/lib/game_of_life/generators/seed.rb b/CLI/ruby/lib/game_of_life/generators/seed.rb index d991efe..6399945 100644 --- a/CLI/ruby/lib/game_of_life/generators/seed.rb +++ b/CLI/ruby/lib/game_of_life/generators/seed.rb @@ -48,7 +48,7 @@ module GameOfLife (0...height).each do |i| (0...width).each do |j| cell = { x: j, y: i, alive: input.fetch(i, nil)&.fetch(j, nil) } - universe[i][j] = ::GameOfLife::Cell.new(cell) + universe[i][j] = ::GameOfLife::Cell.new(**cell) end end universe -- cgit v1.2.3