Hi All, I am a Java Developer and a newbie in Ruby. Does Ruby not implement available classes in Ruby lang itself(as done in Java). Actually I have downloaded the code for Ruby and was trying to find the implementation for classes like Fixnum, etc. But could not find it.
+4
A:
In YARV/MRI most of the core classes are implemented in C (see array.c, bignum.c, string.c and so on) but some of the less-core classes are implemented in Ruby (e.g Set, Vector and so on).
However, in Rubinius (another Ruby implementation) almost all (afaik) of the core classes are implemented in pure Ruby.
banister
2010-05-27 06:14:34
It should be noted that in MRI the code for Fixnum is in numeric.c as the OP said, he couldn't find it.
sepp2k
2010-05-27 09:57:48