Ruby 2.2.0 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > RubyVM::InstructionSequenceクラス > compile_option=

singleton method RubyVM::InstructionSequence.compile_option=

compile_option=(options)[permalink][rdoc]

命令シーケンスのコンパイル時のデフォルトの最適化オプションを引数 options で指定します。

[PARAM] options:
コンパイル時の最適化オプションを true、false、nil、 Hash のいずれかで指定します。true を指定した場合は全てのオプションを有効にします。false を指定した場合は全てのオプションを無効にします。nil を指定した場合はいずれのオプションも変更しません。また、Hash を指定した場合は以下のキーに対して、true か false を指定する事で個別に有効、無効を指定します。
  * :inline_const_cache
  * :instructions_unification
  * :operands_unification
  * :peephole_optimization
  * :specialized_instruction
  * :stack_caching
  * :tailcall_optimization
  * :trace_instruction
:debug_level をキーに指定した場合は値を数値で指定します。

.new、.compile、.compile_file メソッドの実行の際に option 引数を指定した場合はその実行のみ最適化オプションを変更する事もできます。

[SEE_ALSO] RubyVM::InstructionSequence.new, RubyVM::InstructionSequence.compile, RubyVM::InstructionSequence.compile_file