diff options
| author | Ahmed AbdelHalim <[email protected]> | 2023-06-30 15:31:58 +0200 |
|---|---|---|
| committer | Ahmed AbdelHalim <[email protected]> | 2023-06-30 15:31:58 +0200 |
| commit | d124465bc3a83a614eb10eb7c6d6ddff2fc00f35 (patch) | |
| tree | 199fe32dd14b5cd42e472e81969e7241712b0e63 | |
| parent | bc9132d334fbe2e1c01697fc6114f09097457109 (diff) | |
Fix ruby 3 incompatible hash params/keywards
| -rw-r--r-- | .builds/ruby.yml | 4 | ||||
| -rw-r--r-- | CLI/ruby/Gemfile.lock | 2 | ||||
| -rw-r--r-- | CLI/ruby/lib/game_of_life/generators/input.rb | 2 | ||||
| -rw-r--r-- | 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 |
