るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.089秒)
トップページ > クエリ:ruby[x] > クエリ:main[x] > 種類:特異メソッド[x] > クエリ:compile_file[x]

別のキーワード

  1. _builtin main
  2. main define_method
  3. main private
  4. main public
  5. main include

ライブラリ

検索結果

RubyVM::InstructionSequence.compile_file(file, options = nil) -> RubyVM::InstructionSequence (21230.0)

引数 file で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。

...引数 file で指定した Ruby のソースコードを元にコンパイル済みの
Ruby
VM::InstructionSequence オブジェクトを作成して返します。

Ruby
VM::InstructionSequence.compile とは異なり、file、path などの
メタデータは自動的に取得します。

@param...
...細は
Ruby
VM::InstructionSequence.compile_option= を参照
してください。

# /tmp/hello.rb
puts "Hello, world!"

# irb
Ruby
VM::InstructionSequence.compile_file("/tmp/hello.rb")
# => <RubyVM::InstructionSequence:<main>@/tmp/hello.rb>

@see RubyVM::Inst...