Skip to content

Commit 2445829

Browse files
committed
more lint warnings
1 parent 4e9fd0b commit 2445829

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/image_spec.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def has_jpeg?
220220

221221
if has_jpeg?
222222
it "can load a sample jpg image buffer" do
223-
str = File.open(simg("wagon.jpg"), "rb").read
223+
str = File.binread(simg("wagon.jpg"))
224224
x = Vips::Image.new_from_buffer str, ""
225225
expect(x.width).to eq(685)
226226
expect(x.height).to eq(478)
@@ -231,7 +231,7 @@ def has_jpeg?
231231

232232
if has_jpeg?
233233
it "can load a sample jpg image utf-8 buffer" do
234-
str = File.open(simg("wagon.jpg"), "r").read
234+
str = File.read(simg("wagon.jpg"))
235235
x = Vips::Image.new_from_buffer str, ""
236236
expect(x.width).to eq(685)
237237
expect(x.height).to eq(478)
@@ -257,7 +257,7 @@ def has_jpeg?
257257
if has_jpeg?
258258
it "can set an ICC profile on a jpg image" do
259259
x = Vips::Image.new_from_file simg("icc.jpg")
260-
profile = File.open(simg("lcd.icc"), "rb").read
260+
profile = File.binread(simg("lcd.icc"))
261261
x = x.copy
262262
x.set_value "icc-profile-data", profile
263263
x.write_to_file(timg("x.jpg"))

0 commit comments

Comments
 (0)