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
bb3b4474fa
Fix Style/SpecialGlobalVars 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
Robert Haines
fff2c41d68
Configure Lint/SuppressedException cop.
...
In the tests we can say "anything goes", but in the main body of the
code we should at least comment if we're not handling an exception
fully.
2020-02-15 16:26:32 +00:00
Robert Haines
b528cae084
Fix Lint/LiteralAsCondition cop.
...
This fixes Style/InfiniteLoop as a side-effect.
2020-02-15 16:26:32 +00:00
Jan-Joost Spanjers
4a4c553b1e
Move :eof from InputStream to AbastractInputStream
2020-01-26 15:34:17 +01:00
Takumasa Ochi
cf91112b57
Apply automatic correction by rubocop
2017-06-29 11:57:12 +09:00
Koichi ITO
960414aff0
Fix warnings: `constant ::Fixnum is deprecated` in Ruby 2.4
2017-01-08 16:41:23 +09:00
Pavel Lobashov
f7eec2dd76
fix rubocop cop Style/SpaceAroundOperators
2015-06-08 10:26:13 +03:00
Pavel Lobashov
b9aefaffb5
fix rubocop Style/IfUnlessModifier cop
2015-03-24 19:09:22 +03:00
Pavel.Lobashov
225a4f70ce
fix rubocop Style/RedundantReturn cop
2015-03-22 19:27:29 +03:00
Pavel Lobashov
b93ef1266f
fix rubocop Style/StringLiterals cop
2015-03-21 11:27:44 +03:00
Pavel Lobashov
f67cf18e45
fix rubocop Style/EmptyLinesAroundModuleBody cop
2015-03-21 11:22:47 +03:00
Pavel Lobashov
d0c8e8df60
fix rubocop Style/EmptyLines cop
2015-03-21 11:19:14 +03:00
Pavel Lobashov
7a8a8b6fd2
fix rubocop Style/WhileUntilModifier warning
2015-03-20 18:33:43 +03:00
Zac Stewart
192f910992
Use string concatenation instead of String#prepend
...
For < Ruby 1.9.3 compatibility
2014-03-12 11:52:12 -04:00
Zac Stewart
96377f72de
Add InputStream#ungetc
...
Works like IO#ungetc
2014-03-11 21:19:24 -04:00
Krishna Dole
8d3258eebf
Calling #read(number_of_bytes) on a Zip::InputStream should return nil at EOF.
...
Previously it would return an empty string the first time, then raise on subsequent calls.
2013-09-24 15:29:19 -07:00
Alexander Simonov
5f2411955a
Fix tests for 1.9.2
2013-08-30 00:22:19 +03:00
Alexander Simonov
609de2ff48
Zip64 read-only support. Fix #81
2013-08-26 23:26:14 +03:00