This code is not supportable on Rubinius and is generally very bad practice. Bzip2 does not own the Ruby class data structures and should not make any assumptions about them. In this case, the code appears entirely unnecessary because the value is created as a String in the first place. I'm not sure what is the best fix, but this would at least allow compiling on Rubinius. FWIW, there are numerous bad practices in this C extension, such as relying on MRI C globals like rb_rs instead of getting the value of the $/ Ruby global and depending on the internals of RFile. I've added basic RFile support to Rubinius just to support building this C-extension, but there are limits to what I can do.
The cast is done because bz_stream's data is always an unsigned int, so conforming otherwise to a 64 bit number isn't possible
…e right number of arguments or not
Can be executed via `rake build_extensions`
…nces of its usage
…ces and a bit more descriptive/terse in others
…he Writer class a bit
Also reverse the order on the expectations to make a bit more sense