moved #write() C implementation to #_write(), so that the #write() method is
implemented in Ruby, which automatically converts arguments to String