Skip to content

Raise when reinitializing a zlib stream - #165

Open
mame wants to merge 1 commit into
ruby:masterfrom
mame:zlib-reinitialize
Open

mame wants to merge 1 commit into
ruby:masterfrom
mame:zlib-reinitialize

Conversation

@mame

@mame mame commented Oct 24, 2026

Copy link
Copy Markdown
Member

Calling initialize again on an initialized object leaked the previous zlib stream state. Raise RuntimeError, as File#initialize does.

  z = Zlib::Inflate.new
  300_000.times { z.send(:initialize) }
  # RSS: 1.2 GB

Calling initialize again on an initialized object leaked the previous
zlib stream state.  Raise RuntimeError, as File#initialize does.

  z = Zlib::Inflate.new
  300_000.times { z.send(:initialize) }
  # RSS: 1.2 GB

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant