Technically yes, this is common in JVM implementations, Android, .NET, and oldies like Smalltalk and Common Lisp.
So it could be possible to implement something similar for Ruby.