/* * call-seq: * open(filename, mode='wb', &block=nil) -> Bzip2::Writer * * @param [String] filename the name of the file to write to * @param [String] mode a mode string passed to Kernel#open * @yieldparam [Bzip2::Writer] writer the Bzip2::Writer instance * * If a block is given, the created Bzip2::Writer instance is yielded to the * block and will be closed when the block completes. It is guaranteed via * +ensure+ that the writer is closed * * If a block is not given, a Bzip2::Writer instance will be returned * * Bzip2::Writer.open('file') { |f| f << data } * * writer = Bzip2::Writer.open('file') * writer << data * writer.close * * @return [Bzip2::Writer, nil] */ static VALUE bz_writer_s_open(int argc, VALUE *argv, VALUE obj) {