るりまサーチ

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. ipaddr to_i

ライブラリ

クラス

モジュール

検索結果

<< 1 2 > >>

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

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

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

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

@param string 正規表現を文字列として与えま...
...@param option Regexp::IGNORECASE, Regexp::MULTILINE,
Regexp::EXTENDED
の論理和を指定します。
I
nteger 以外であれば真偽値の指定として見なされ
、真(nil, false 以外)であれば
Regexp::IGNORECASE...
...ングは ASCII-8BIT になります。
それ以外の指定は警告を出力します。

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

//emlist[例][ruby]{
str = "This is Regexp"
t1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t1...

NODE * rb_compile_string(const char *f, VALUE s, int line) (18300.0)

Ruby の文字列 s を構文木にコンパイルし、ruby_eval_tree と ruby_eval_tree_begin に格納します。ruby_eval_tree を返します。 またコンパイルするときにファイル f の line 行目からをコンパイル していると仮定します。

...Ruby の文字列 s を構文木にコンパイルし、ruby_eval_tree と
ruby_eval_tree_begin に格納します。ruby_eval_tree を返します。
またコンパイルするときにファイル f の line 行目からをコンパイル
していると仮定します。...

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

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

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

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

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

RubyVM::InstructionSequence.load_from_binary_extra_data(binary) -> String (9406.0)

バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。

...埋め込まれたextra_dataを取り出します。

//emlist[例][ruby]{
i
seq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary("extra_data")
RubyVM::InstructionSequence.load_from_binary_extra_data(binary) # => extra_data
//}

@see RubyVM::InstructionSequence#to_binary...

RubyVM::InstructionSequence#inspect -> String (9306.0)

self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。

...んだ人間に読みやすい文字列にして返します。

//emlist[例][ruby]{
i
seq = RubyVM::InstructionSequence.compile('num = 1 + 2')
i
seq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}

@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path...

絞り込み条件を変える

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

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

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

引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence...
....load_from_binary_extra_data メソッドでこの文字列にアクセス出来ます。

注意: 変換後のバイナリデータはポータブルではありません。 to_binary で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキ...
...テクチャのRubyで作られたバイナリデータは使用できません。

//emlist[例][ruby]{
i
seq = RubyVM::InstructionSequence.compile('num = 1 + 2')
i
seq.to_binary("extra_data")

# ※表示の都合上改行しているが実際は改行はない
# => "YARB\x02\x00\x00\x00\x03\x00\x00...

Regexp.new(string, option = nil, code = nil) -> Regexp (6219.0)

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

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

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

@param string 正規表現を文字列として与えま...
...@param option Regexp::IGNORECASE, Regexp::MULTILINE,
Regexp::EXTENDED
の論理和を指定します。
I
nteger 以外であれば真偽値の指定として見なされ
、真(nil, false 以外)であれば
Regexp::IGNORECASE...
...ングは ASCII-8BIT になります。
それ以外の指定は警告を出力します。

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

//emlist[例][ruby]{
str = "This is Regexp"
t1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t1...

RubyVM::InstructionSequence#disasm -> String (6206.0)

self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。

...ubyVM::InstructionSequence.compile('1 + 2').disasm

出力:

== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>...
...0008 leave

@see RubyVM::InstructionSequence.disasm...

RubyVM::InstructionSequence#disassemble -> String (6206.0)

self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。

...ubyVM::InstructionSequence.compile('1 + 2').disasm

出力:

== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>...
...0008 leave

@see RubyVM::InstructionSequence.disasm...

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

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

...していた場合は nil を返します。

例1:irb で実行した場合

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

絞り込み条件を変える

<< 1 2 > >>