Fix to build bzip2-ruby with Rubinius. #14

Merged
merged 1 commit into from Sep 12, 2012
Commits on Apr 28, 2012
  1. @brixen

    Don't poke inside private MRI data structures.

    brixen committed Apr 28, 2012
    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.