MRI / CRuby / YARV

About Ruby (ruby-lang.org)

Three names for the standard Ruby you download: whose it is, what it is written in, and the engine inside.

The Ruby you download from ruby-lang.org is one program that goes by several nicknames, and each one describes it from a different angle. Ruby’s own site calls it MRI, for “Matz’s Ruby Interpreter,” after the language’s creator Yukihiro "Matz" Matsumoto, and also CRuby, “since it is written in C”. The third name, YARV (“Yet another Ruby VM”), is the bytecode virtual machine that lives inside it: instead of re-reading your source over and over, it first compiles your code into compact instructions that the machine then runs. YARV was written by Koichi Sasada and became the official engine in Ruby 1.9. One more piece of vocabulary you will bump into: this interpreter has a Global VM Lock (GVL, and you will also see it called a GIL, for global interpreter lock), a lock that lets only one thread run Ruby code at a time. So MRI, CRuby, and YARV are not three different Rubies: they are three names pointing at the same one.

Related: Yukihiro "Matz" Matsumoto · Ruby 1.9 · Koichi Sasada

Sources

Sources

  • About Ruby (MRI = “Matz’s Ruby Interpreter”; CRuby = written in C): https://www.ruby-lang.org/en/about/
  • YARV (“Yet another Ruby VM”; Koichi Sasada; official in Ruby 1.9): https://en.wikipedia.org/wiki/YARV
  • Global interpreter lock (Ruby MRI’s is called the Global VM Lock; one thread at a time): https://en.wikipedia.org/wiki/Global_interpreter_lock

See a mistake? Edit this page on GitHub