Have you looked at the C source of Ruby? :) In terms of that, Python is far, far superior to ruby.
EDIT: to clarify, CPython is much cleaner than MRI, and has a much-better-documented API for extensions. This is what I believe part of the reason that Python has a much better coverage for scientific packages.
Disagree. I deal with the C parts of Perl, Ruby and Python and better VM's on a daily basis. Ruby has by far the cleanest implementation of the VM. Almost like the VM of a good Lisp/functional lang. Python and Perl are the worst of all, on par with PHP.
Ruby is unfortunately also the slowest. But not because of the VM implementation, only because of the everything is a method architecture, even for the simplest primitives. The ruby API is pure and clean, this is what makes it slow.
For the python or perl API too much inner state needs to be handled, which makes it slow also. Because you cannot use a better design for data and code. Only php made significant advantages there recently, so you don't have to worry about inefficient data and code, only about the eye blead VM.
I don't know if I can agree that the Ruby C API implementation is the cleanest -- from my experience I'll say it's very pure, but pure does not really mean clean, and it sometimes (esp. when performance is a concern) makes writing C extensions messy.
Python's C API could be argued that it uses too much abstraction, but it definitely makes it that much easier to write extensions.
Have you looked at the C source of Ruby? :) In terms of that, Python is far, far superior to ruby.
EDIT: to clarify, CPython is much cleaner than MRI, and has a much-better-documented API for extensions. This is what I believe part of the reason that Python has a much better coverage for scientific packages.