Jean Boussier
385ebd054a
Ensure compatibility with `--enable-frozen-string-literal`
...
Ref: https://bugs.ruby-lang.org/issues/20205
In Ruby 3.4 string literals will be "chilled" by default. Meaning
they are still mutable, but will pretend to be frozen.
In most case it has no impact, just emit a few warnings there and
there, but there is one thing it impacts is the `StringIO.new('')`
pattern. `StringIO` checks if the given string is frozen, and if
it is will act as a read only IO.
This breaks rubyzip 2.x.
This commit make the 2.x branch compatible with frozen string literals.
2024-04-08 15:10:07 +01:00
Robert Haines
d07b36b2e6
Fix Style/TernaryParentheses cop.
2020-02-15 16:26:32 +00:00
Robert Haines
2e11a88fd2
Fix Style/StringLiterals cop.
2020-02-15 16:26:32 +00:00
Robert Haines
3121ad066f
Fix Style/Alias cop.
2020-02-15 16:26:32 +00:00
Robert Haines
cfe4972e71
Fix Layout/EmptyLineAfterGuardClause cop.
2020-02-15 16:26:32 +00:00
taichi
b326d17438
use @+ operator instead of #dup to get unfrozen string
2020-02-05 11:40:56 +09:00
John Lees-Miller
040962a59f
Remove unused error argument
2020-02-01 13:19:15 +00:00
Jan-Joost Spanjers
a5d068d3e8
Support Decompressor plugins
2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers
456bd4d92c
Mimic IO#read return values in Decompressor#read
2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers
c66277db58
Rename Decompressor#sysread to #read
2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers
00b525d76e
Fix returned outbuf for Inflater#sysread
2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers
cda7127107
Add Decompressor#input_stream
2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers
4ac83737b1
Cleanup Inflater
2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers
4e28f7286c
Untangle encryption and decompression
2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers
8f7c5caf29
Drop #produce_input from Decompressor class
2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers
d20a6834a3
Rework Inflater#produce_input to use sysread
...
This aligns Inflater#produce_input with
PassThruDecompresser#produce_input.
2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers
1b6aeb2cd0
Replace Decompressor#input_finished? with #eof
2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers
0b7b78dc4a
Encapsulate Zlib errors within DecompressionError
2020-01-26 15:34:13 +01:00
taichi
74f0d4eabb
fixed errors caused by frozen-string-literal
2019-02-28 01:23:29 +09:00
Takumasa Ochi
cf91112b57
Apply automatic correction by rubocop
2017-06-29 11:57:12 +09:00
Pavel Lobashov
c0177a455b
Merge branch 'master' into rubocop_fixes
...
Conflicts:
README.md
samples/example_recursive.rb
2015-06-08 10:14:25 +03:00
Vít Ondruch
32016ab1bf
Remove executable bit.
2015-03-31 13:15:46 +02:00
Pavel.Lobashov
06e5a9352d
fix rubocop Style/ParenthesesAroundCondition cop
2015-03-22 19:25:35 +03:00
Pavel Lobashov
b730387cf2
redone fixes by rubocop Style/Alias to be in style of https://github.com/bbatsov/ruby-style-guide#alias-method-lexically
2015-03-21 13:14:21 +03:00
Pavel.Lobashov
bb08213cb7
fix rubocop Style/Alias cop
2015-03-20 23:17:05 +03:00
Shigeaki Matsumura
c70e5836c7
support traditional encryption
2015-01-01 11:09:17 +09:00
Alexander Simonov
a989e8c145
Revert "Speed up Deflater sysread speed when number_of_bytes is small and @output_buffer is large"
...
This reverts commit a800987a52
.
2014-07-02 14:05:13 +03:00
Henry Yang
a800987a52
Speed up Deflater sysread speed when number_of_bytes is small and @output_buffer is large
2014-02-04 10:56:56 -08:00
Alexander Simonov
5f2411955a
Fix tests for 1.9.2
2013-08-30 00:22:19 +03:00
Alexander Simonov
974f5675c2
Code refactoring start
2013-06-02 21:33:03 +03:00
Alexander Simonov
3418d31b44
Code cleanup
2011-11-17 22:53:04 +02:00
Alan Harper
cd038ae442
Split Zip module up by class in to seperate files
2010-11-30 18:27:59 +10:00