Skip to content

Commit

Permalink
Merge pull request #217 from eregon/ci-tweaks-investigate-truffleruby…
Browse files Browse the repository at this point in the history
…-hang

Add a timeout in CI and enable verbose tests for truffleruby
  • Loading branch information
peterzhu2118 authored Mar 11, 2024
2 parents 71fb89c + f1c609b commit 5a786af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/liquid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
include:
Expand Down Expand Up @@ -31,6 +32,7 @@ jobs:
continue-on-error: ${{ matrix.allowed-failure }}
env:
LIQUID_C_PEDANTIC: 'true'
TEST_OPTS: '-v -s0'
if: matrix.ruby == 'truffleruby-head'

- run: bundle exec rubocop
Expand Down
7 changes: 4 additions & 3 deletions ext/liquid_c/liquid_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ static void write_fixnum(VALUE output, VALUE fixnum)
long capacity = rb_str_capacity(output);

if (new_size > capacity) {
do {
capacity *= 2;
} while (new_size > capacity);
capacity *= 2;
if (new_size > capacity) {
capacity = new_size;
}
rb_str_resize(output, capacity);
}
rb_str_set_len(output, new_size);
Expand Down

0 comments on commit 5a786af

Please sign in to comment.