るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

モジュール

検索結果

<< 1 2 3 > >>

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

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

...クトを作成して返します。

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

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

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

@
param line 引数 source の 1 行...
...かで指定します。詳細は
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 (18143.0)

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

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

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

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

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

@
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 # ここは使用されない
\ is
\ regexp # ここも使用されない
',...

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

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

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

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

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

@
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 # こ...
...使用されない
', Regexp::EXTENDED | Regexp::IGNORECASE)
t2.match(str)
p Regexp.last_match # => "This is Regexp"

str = "ふるいけや\nかわずとびこむ\nみずのおと"
t2 = Regexp.compile("ふる.*?と", Regexp::MULTILINE)
p t2.match(str)[0] # => "ふるいけや\nかわずと"
//}...

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

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

...ェクトを作成して返します。

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

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

@
param options コンパイル時のオプションを true、false、H...
...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) (6137.0)

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

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

@
param options コンパイル時の最適化オプションを true、false、nil、
Hash のいずれかで指定します。true を指定した場合は...
...、.compile、.compile_file メソッドの実行の際に option 引数を指定し
た場合はその実行のみ最適化オプションを変更する事もできます。

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

絞り込み条件を変える

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

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

...ル時のデフォルトの最適化オプションを Hash で返
します。

//emlist[例][ruby]{
require "pp"
pp RubyVM::InstructionSequence.compile_option

# => {:inline_const_cache=>true,
# :peephole_optimization=>true,
# :tailcall_optimization=>false,
# :specialized_instruction=>true,
# :ope...
...rands_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=...

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

...クトを作成して返します。

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

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

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

@
param line 引数 source の 1 行...
...かで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。

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

@
see RubyVM::InstructionSequence.compile_file...

絞り込み条件を変える

<< 1 2 3 > >>