
JRuby is written in Java and runs on the Java VM, so any C extension support would most likely have to be a wrapper around JNI.
There
is experimental support for C extensions in the latest version, but experimental's the keyword here: most libraries that use it aren't quite working yet and there's no guarantee it won't crash. The more non-trivial a library is (Gosu is very non-trivial; most SWIG-generated bindings are), the less likely it is to work.
Also, I'd be surprised if JRuby's extension support is binary-compatible with MRI; you probably have to recompile. It's pretty hard to actually find any information about it, though.