Ruby : Compiling your source code to byte code

Hey, from ruby 2.3.0 its so easy to compile your source code to bytecodes the Ruby-VM understands.

byte_code = RubyVM::InstructionSequence.compile_file '/home/john/somefile.rb'

File.binwrite '/home/john/bytecode', byte_code.to_binary

and in Command Line Continue reading

Advertisements