Skip to content

Commit 3d2d50f

Browse files
committed
Apply Standard
1 parent 2710190 commit 3d2d50f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spec/zip_kit/streamer_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def stream_with_just_write.write(bytes)
273273

274274
# Rubyzip does not properly set the encoding of the entries it reads
275275
expect(second_entry.gp_flags).to eq(2_048)
276-
expect(second_entry.name).to eq("второй-файл.bin".dup.force_encoding(Encoding::BINARY))
276+
expect(second_entry.name).to eq((+"второй-файл.bin").force_encoding(Encoding::BINARY))
277277
end
278278
end
279279

spec/zip_kit/write_and_tell_spec.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
[12, 123, 0, 3].pack("C*")
2020
]
2121

22-
buf = "превед".dup.force_encoding(Encoding::BINARY)
22+
buf = (+"превед").force_encoding(Encoding::BINARY)
2323
writer = described_class.new(buf)
2424
strs.each { |s| writer << s }
2525
expect(writer.tell).to eq(79)
2626
expect(buf.bytesize).to eq(91) # It already contained some bytes
2727
end
2828

2929
it "does not change the encoding of the source string" do
30-
str = "текста кусок".dup.force_encoding(Encoding::UTF_8)
31-
buf = "превед".dup.force_encoding(Encoding::BINARY)
30+
str = (+"текста кусок").force_encoding(Encoding::UTF_8)
31+
buf = (+"превед").force_encoding(Encoding::BINARY)
3232
writer = described_class.new(buf)
3333
writer << str
3434
expect(buf.bytesize).to eq(35)

0 commit comments

Comments
 (0)