るりまサーチ

最速Rubyリファレンスマニュアル検索!
55件ヒット [1-55件を表示] (0.053秒)

別のキーワード

  1. mkmf try_compile
  2. _builtin compile
  3. ripper compile_error
  4. kernel try_compile
  5. _builtin compile_file

キーワード

検索結果

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

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

...yVM::InstructionSequence.compile_option= を参照
してください。

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

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

@see RubyVM::InstructionSequence.compile...

RubyVM::InstructionSequence.compile_option=(options) (15.0)

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

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

@see RubyVM::InstructionSequence.new,
RubyVM::InstructionSequence.compile,
RubyVM::InstructionSequence.compile_file...

RubyVM::InstructionSequence.compile(source, file = nil, path = nil, line = 1, options = nil) -> RubyVM::InstructionSequence (9.0)

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

...かで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。

RubyVM::InstructionSequence.compile("a = 1 + 2")
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>

@see RubyVM::InstructionSequence.compile_file...

RubyVM::InstructionSequence.new(source, file = nil, path = nil, line = 1, options = nil) -> RubyVM::InstructionSequence (9.0)

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

...かで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。

RubyVM::InstructionSequence.compile("a = 1 + 2")
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>

@see RubyVM::InstructionSequence.compile_file...

RubyVM::InstructionSequence.of(body) -> RubyVM::InstructionSequence (9.0)

引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。

...s bar; end
> RubyVM::InstructionSequence.of(method(:foo))
> # => <RubyVM::InstructionSequence:foo@(irb)>

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/iseq_of.rb
def hello
puts "hello, world"
end

$a_global_proc = proc { str = 'a' + 'b' }

# irb
>...

絞り込み条件を変える