Since Ruby lets you drop down into C for any bits where performance is critical and plain Ruby is not up to the task, and since C lets you drop down into assembly for the same sort of circumstance, I've always wondered if it would be possible to embed assembly language inside your Ruby code by first dropping down to C and then from within the C code dropping down to assembly.
I've always hoped that was possible, but never until now found anything to confirm or deny it. Because of research on Qt (and therefore C++) for a side project, I happened upon a statement on ruby-lang.com's comparison of Ruby with C & C++ that in Ruby
- You cannot drop down to assembly
Does this mean simply that you cannot go directly to assembly, or that you cannot do it by way of C at all? What about if you're writing an extension to Ruby in C: can I assume that since that is just C (not embedded in Ruby) you can still use assembly there and Ruby can still use the C extension with assembly in it?