るりまサーチ (Ruby 2.6.0)

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

別のキーワード

  1. argf.class lines
  2. argf.class each
  3. argf.class each_line
  4. argf.class set_encoding
  5. argf.class readlines

ライブラリ

キーワード

検索結果

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

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

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

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

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

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

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

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

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

..." を返します。

例1:irb で実行した場合

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
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::InstructionSequence#absolute_path...

RubyVM::InstructionSequence#absolute_path -> String | nil (18397.0)

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

...l を返します。

例1:irb で実行した場合

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
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 RubyVM::InstructionSequence#path...

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

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

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

@param source Ruby のソースコードを文字列で指定します。

@param file ファイル名を文字列で指定しま...
...かで指定します。詳細は
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 (346.0)

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

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

@param source Ruby のソースコードを文字列で指定します。

@param file ファイル名を文字列で指定しま...
...かで指定します。詳細は
RubyVM::InstructionSequence
.compile_option= を参照
してください。

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

@see RubyVM::InstructionSequence.compile_file...

絞り込み条件を変える