diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4b93cfd..6eb76e1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 @@ -38,7 +38,6 @@ jobs: matrix: os-version: [ 'ubuntu-20.04' ] ruby-version: - - '2.0' - '2.1' - '2.2' - '2.3' @@ -56,7 +55,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 diff --git a/lib/vips/image.rb b/lib/vips/image.rb index 8d35433..45bd2ed 100644 --- a/lib/vips/image.rb +++ b/lib/vips/image.rb @@ -458,14 +458,14 @@ def self.new_from_source source, option_string, **opts loader = Vips.vips_foreign_find_load_source source raise Vips::Error if loader.nil? - image = Vips::Operation.call loader, [source], opts, option_string + result = Vips::Operation.call loader, [source], opts, option_string # keep a secret ref to the source object ... the libvips loader will # keep a ref to the C source object, but we need the ruby wrapper object # to stay alive too - image.references << source + result.references << source - image + result end def self.matrix_from_array width, height, array