るりまサーチ

最速Rubyリファレンスマニュアル検索!
99件ヒット [1-99件を表示] (0.042秒)
トップページ > ライブラリ:ビルトイン[x] > クエリ:compile_file[x]

別のキーワード

  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 (18109.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#absolute_path -> String | nil (14.0)

self が表す命令シーケンスの絶対パスを返します。

...ed>>
iseq.absolute_path
# => nil

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

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

# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"

@see R...

RubyVM::InstructionSequence#base_label -> String (14.0)

self が表す命令シーケンスの基本ラベルを返します。

...iseq.base_label
# => "<compiled>"

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

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

# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.base_label # => "<main>"

例3:

# /tmp/m...

RubyVM::InstructionSequence#label -> String (14.0)

self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。

...d>>
iseq.label
# => "<compiled>"

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

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

# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.label # => "<main>"

例3:

# /tmp/method...

RubyVM::InstructionSequence#path -> String (14.0)

self が表す命令シーケンスの相対パスを返します。

...ed>>
iseq.path
# => "<compiled>"

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

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

# irb
> iseq = RubyVM::InstructionSequence.compile_file('method.rb')
> iseq.path # => "method.rb"

@see RubyVM::InstructionS...

絞り込み条件を変える

RubyVM::InstructionSequence.compile_option=(options) (14.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 (8.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 (8.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 (8.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
>...