Oh … FYI, Ruby is implemented in C so it itself has a C API.
For a “live” C extension running within SketchUp’s process, you can call Ruby API functionality.
In my Ruby Learning Resources Book list, see the downloadable PDF for:
- “Extending Ruby 1.9: Writing Extensions in C"
There are several C functions for calling Ruby methods.
You can use one of these to get the path string by calling the method on the texture object.