るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

クラス

モジュール

検索結果

<< 1 2 3 ... > >>

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

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

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

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

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

@par...
...す。

@param line 引数 source の 1 行目の行番号を指定します。

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

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

@see RubyVM::InstructionSequence.compile_file...

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

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

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

第一引数が正規表現であれば第一引数を複製して返します。第二、第三引数は警告の上無視されます。

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

@par...
...er 以外であれば真偽値の指定として見なされ
、真(nil, false 以外)であれば
R
egexp::IGNORECASE の指定と同じになります。

@param code "n", "N" が与えられた時には、生成された正規表現のエンコーディングは ASCII-8...
...を出力します。

@raise RegexpError 正規表現のコンパイルに失敗した場合発生します。

//emlist[例][ruby]{
str = "This is Regexp"
t1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t1.match(str)
p $~ # => "This is Regexp"

t2 = Regexp.compile('
this # こ...

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

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

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

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

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

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

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

@see RubyVM::InstructionSequence.compile...

Kernel#try_compile(src, opt = "", *opts) -> bool (12302.0)

与えられた C のソースコードがコンパイルできた場合は真を返します。 コンパイルできなかった場合は偽を返します。

...ンパイル前に評価されます。
ブロック内でソースコードを変更することができます。

@param src C のソースコードを指定します。

@param opt コンパイラに渡すオプションを指定します。
$CFLAGS もコンパイラには渡され...

Kernel#try_compile(src, opt = "", *opts) { ... } -> bool (12302.0)

与えられた C のソースコードがコンパイルできた場合は真を返します。 コンパイルできなかった場合は偽を返します。

...ンパイル前に評価されます。
ブロック内でソースコードを変更することができます。

@param src C のソースコードを指定します。

@param opt コンパイラに渡すオプションを指定します。
$CFLAGS もコンパイラには渡され...

絞り込み条件を変える

Ripper#compile_error(msg) -> nil (12301.0)

解析した Ruby プログラムの中にコンパイルエラーがあった場合に実行されま す。

...解析した Ruby プログラムの中にコンパイルエラーがあった場合に実行されま
す。

@param msg エラーメッセージ。

サブクラスでオーバライドして使用します。...

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

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

...][ruby]{
r
equire "pp"
pp 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,
# :trac...
...e_instruction=>true,
# :frozen_string_literal=>false,
# :debug_frozen_string_literal=>false,
# :coverage_enabled=>true,
# :debug_level=>0}
//}

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

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

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

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

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

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

@par...
...す。

@param line 引数 source の 1 行目の行番号を指定します。

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

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

@see RubyVM::InstructionSequence.compile_file...

RubyVM::InstructionSequence#first_lineno -> Integer (9212.0)

self が表す命令シーケンスの 1 行目の行番号を返します。

...の 1 行目の行番号を返します。

例1:irb で実行した場合

R
ubyVM::InstructionSequence.compile('num = 1 + 2').first_lineno
# => 1

例2:

# /tmp/method.rb
r
equire "foo-library"
def foo
p :foo
end

R
ubyVM::InstructionSequence.of(method(:foo)).first_lineno
# => 2...

RubyVM::InstructionSequence#to_binary(extra_data = nil) -> String (9212.0)

バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。

...て返します。
R
ubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。

引数の extra_data はバイナリデータと共に保存されます。
R
ubyVM::InstructionSequence.load_from_binary_extra_data メソッ...
...ry で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキテクチャのRubyで作られたバイナリデータは使用できません。

//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.to_binary("extr...
...合上改行しているが実際は改行はない
# => "YARB\x02\x00\x00\x00\x03\x00\x00\x00\x16\x02\x00\x00\n\x00\x00\x00\x01
# \x00\x00\x00\x03\x00\x00\x00\x05\x00\x00\x00\x84\x01\x00\x00\x88\x01\x00
# \x00\x02\x02\x00\x00x86_64-darwin15\x00*\x00\x00\x00\x00\x00\x00\x00\x01
# \x00\x00\x00\x00\x0...

絞り込み条件を変える

<< 1 2 3 ... > >>