compile

InstructionSequence.compile(source[, file[, path[, line[, options]]]]) รข iseq
Class Public methods

Takes source, a String of Ruby code and compiles it to an InstructionSequence.

Optionally takes file, path, and line which describe the filename, absolute path and first line number of the ruby code in source which are metadata attached to the returned iseq.

options, which can be true, false or a Hash, is used to modify the default behavior of the Ruby iseq compiler.

For details regarding valid compile options see ::compile_option=.

RubyVM::InstructionSequence.compile("a = 1 + 2")
#=> <RubyVM::InstructionSequence:<compiled>@<compiled>>
doc_ruby_on_rails
2015-05-13 20:26:02
Comments
Leave a Comment

Please login to continue.