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 --- .builds/ruby.yml | 4 ++-- CLI/ruby/Gemfile.lock | 2 +- CLI/ruby/lib/game_of_life/generators/input.rb | 2 +- CLI/ruby/lib/game_of_life/generators/seed.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.builds/ruby.yml b/.builds/ruby.yml index d488102..41893c6 100644 --- a/.builds/ruby.yml +++ b/.builds/ruby.yml @@ -1,4 +1,4 @@ -image: alpine/latest +image: alpine/3.18 packages: - ruby @@ -15,7 +15,7 @@ secrets: tasks: - install: | cd game-of-life/CLI/ruby - bundle install -j $(nproc) + sudo bundle install -j $(nproc) - test: | cd game-of-life/CLI/ruby diff --git a/CLI/ruby/Gemfile.lock b/CLI/ruby/Gemfile.lock index 7223358..c4b5556 100644 --- a/CLI/ruby/Gemfile.lock +++ b/CLI/ruby/Gemfile.lock @@ -83,4 +83,4 @@ DEPENDENCIES yard BUNDLED WITH - 2.1.4 + 2.4.12 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