Skip to content

Instantly share code, notes, and snippets.

@kpumuk
Created February 7, 2011 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kpumuk/815262 to your computer and use it in GitHub Desktop.
Save kpumuk/815262 to your computer and use it in GitHub Desktop.
Patch for Ruby to fix "tar_input.rb:49:in `initialize': not in gzip format (Zlib::GzipFile::Error)" exception
diff -crB a/source/ext/zlib/zlib.c b/source/ext/zlib/zlib.c
*** a/source/ext/zlib/zlib.c 2010-06-03 09:01:09.000000000 +0000
--- b/source/ext/zlib/zlib.c 2011-02-07 21:21:05.000000000 +0000
***************
*** 610,615 ****
--- 610,616 ----
}
#define zstream_append_input2(z,v)\
+ RB_GC_GUARD(v),\
zstream_append_input((z), RSTRING(v)->ptr, RSTRING(v)->len)
static void
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment