るりまサーチ

最速Rubyリファレンスマニュアル検索!
187件ヒット [1-100件を表示] (0.081秒)
トップページ > クエリ:IO[x] > クエリ:p[x] > クエリ:compile[x]

別のキーワード

  1. io popen
  2. io pipe
  3. io each_line
  4. io readlines
  5. io each

検索結果

<< 1 2 > >>

static NODE * compile(VALUE src, char *file, int line) (44216.0)

Ruby の文字列または IO オブジェクト src を 構文木にコンパイルし、返します。そのとき、src が ファイル file の line 行目から始まっていると仮定します。

...Ruby の文字列または IO オブジェクト src を
構文木にコンパイルし、返します。そのとき、src が
ファイル file の line 行目から始まっていると仮定します。...

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

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

...tructionSequence オブジェクトを作成して返します。

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

@param file ファイル名を文字列で指定します。

@param path 引数 file の絶対パスファイル名を文字列で指定します。

@param...
...@param options コンパイル時のオプションを true、false、Hash オブ
ジェクトのいずれかで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。

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

@see RubyVM::InstructionSequence.compile_file...

Regexp.compile(string, option = nil, code = nil) -> Regexp (24337.0)

文字列 string をコンパイルして正規表現オブジェクトを生成して返します。

...して返します。第二、第三引数は警告の上無視されます。

@param string 正規表現を文字列として与えます。

@param option Regexp::IGNORECASE, Regexp::MULTILINE,
Regexp::EXTENDED
の論理和を指定します。
Integer...
...Regexp::IGNORECASE の指定と同じになります。

@param code "n", "N" が与えられた時には、生成された正規表現のエンコーディングは ASCII-8BIT になります。
それ以外の指定は警告を出力します。

@raise RegexpError 正規表...
...s is Regexp"
t1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t1.match(str)
p
$~ # => "This is Regexp"

t2 = Regexp.compile('
this # ここは使用されない
\ is
\ regexp # ここも使用されない
', Regexp::EXTENDED | Regexp::IGNORECASE)
t2.match(str)
p
Regexp.last_matc...

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

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

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

@param options コンパイル時の最適化オプションを true、false、nil、
Hash のいずれかで指定します。true を指定した場合は...
...uctions_unification
* :operands_unification
* :peephole_optimization
* :specialized_instruction
* :stack_caching
* :tailcall_optimization
* :trace_instruction
//}
:debug_level をキーに指定した場合は値を数値で指定します。

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

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

RubyVM::InstructionSequence.compile_option -> Hash (21313.0)

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

...e "pp"
p
p RubyVM::InstructionSequence.compile_option

# => {:inline_const_cache=>true,
# :peephole_optimization=>true,
# :tailcall_optimization=>false,
# :specialized_instruction=>true,
# :operands_unification=>true,
# :instructions_unification=>false,
# :stack_caching=>false,
# :trace_instruction=>...
...true,
# :frozen_string_literal=>false,
# :debug_frozen_string_literal=>false,
# :coverage_enabled=>true,
# :debug_level=>0}
//}

@see RubyVM::InstructionSequence.compile_option=...

絞り込み条件を変える

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

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

...RubyVM::InstructionSequence オブジェクトを作成して返します。

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

@param file ファイル名を文字列で指定します。

@param options コンパイル時...
...yVM::InstructionSequence.compile_option= を参照
してください。

# /tmp/hello.rb
p
uts "Hello, world!"

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

@see RubyVM::InstructionSequence.compile...

NODE * rb_compile_file(const char *f, VALUE file, int start) (12216.0)

Ruby の IO オブジェクト file から文字列を読み込み、 それを Ruby プログラムとして構文木にコンパイルします。 作成した構文木は ruby_eval_tree と ruby_eval_tree_begin に 格納し、同時に ruby_eval_tree を返します。 またコンパイルするときにファイル f の line 行目からをコンパイル していると仮定します。

...Ruby の IO オブジェクト file から文字列を読み込み、
それを Ruby プログラムとして構文木にコンパイルします。
作成した構文木は ruby_eval_tree と ruby_eval_tree_begin に
格納し、同時に ruby_eval_tree を返します。
またコンパイルす...

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

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

...tructionSequence オブジェクトを作成して返します。

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

@param file ファイル名を文字列で指定します。

@param path 引数 file の絶対パスファイル名を文字列で指定します。

@param...
...@param options コンパイル時のオプションを true、false、Hash オブ
ジェクトのいずれかで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。

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

@see RubyVM::InstructionSequence.compile_file...

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

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

...ctionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil

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

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

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

@see RubyVM::InstructionSequence#path...

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

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

..."<compiled>" を返します。

例1:irb で実行した場合

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.path
# => "<compiled>"

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

# /tmp/met...
...hod.rb
def hello
p
uts "hello, world"
end

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

@see RubyVM::InstructionSequence#absolute_path...

絞り込み条件を変える

<< 1 2 > >>