Just-in-Time Compilers

Historically, computer languages are translated in one of two different ways. A language might use a compiler to convert the program code directly to machine language. This compilation happens in a separate step before the code is executed and produces machine-language artifacts. When it’s time to run the code, the machine-language version is run, and the original source code isn’t used.

Ruby typically uses a different tool called an interpreter. An interpreter converts the source code to machine language at runtime, generally without creating an intermediate machine-language artifact. In an interpreted language, you typically use the original source code at runtime.

That said, the line between compilers and interpreters ...

Get Programming Ruby 3.3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.