るりまサーチ

最速Rubyリファレンスマニュアル検索!
60件ヒット [1-60件を表示] (0.042秒)
トップページ > クエリ:String[x] > クエリ:method[x] > 種類:モジュール関数[x]

別のキーワード

  1. string []=
  2. string slice!
  3. string []
  4. string slice
  5. string gsub!

ライブラリ

モジュール

キーワード

検索結果

Kernel.#caller(range) -> [String] | nil (116.0)

start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。

...します。

//emlist[例][ruby]{
def parse_caller(at)
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
file = $1
line = $2.to_i
method
= $3
[file, line, method]
end
end

def foo
p parse_caller(caller.first)
end

def bar
foo
p parse_caller(caller.first)
end

bar
p parse_caller(calle...

Kernel.#caller(start = 1) -> [String] | nil (116.0)

start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。

...します。

//emlist[例][ruby]{
def parse_caller(at)
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
file = $1
line = $2.to_i
method
= $3
[file, line, method]
end
end

def foo
p parse_caller(caller.first)
end

def bar
foo
p parse_caller(caller.first)
end

bar
p parse_caller(calle...

Kernel.#caller(start, length) -> [String] | nil (116.0)

start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。

...します。

//emlist[例][ruby]{
def parse_caller(at)
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
file = $1
line = $2.to_i
method
= $3
[file, line, method]
end
end

def foo
p parse_caller(caller.first)
end

def bar
foo
p parse_caller(caller.first)
end

bar
p parse_caller(calle...

Marshal.#dump(obj, limit = -1) -> String (114.0)

obj を指定された出力先に再帰的に出力します。

...具体的には以下のイン
スタンス。Dir, File::Stat, IO とそのサブクラス
File, Socket など。
* MatchData, Data, Method, UnboundMethod,
Proc, Thread, ThreadGroup, Continuation
のインスタンス。
* 特異メソッドを定義したオブジェクト

また、...
...と深さチェックを行いません。
デフォルトは -1 です。

@return port を省略すると、obj をダンプした String を返します。
port を指定すると port を返します。

@raise TypeError ファイルに書き出せないオブジェク...

Marshal.#dump(obj, port, limit = -1) -> IO (14.0)

obj を指定された出力先に再帰的に出力します。

...具体的には以下のイン
スタンス。Dir, File::Stat, IO とそのサブクラス
File, Socket など。
* MatchData, Data, Method, UnboundMethod,
Proc, Thread, ThreadGroup, Continuation
のインスタンス。
* 特異メソッドを定義したオブジェクト

また、...
...と深さチェックを行いません。
デフォルトは -1 です。

@return port を省略すると、obj をダンプした String を返します。
port を指定すると port を返します。

@raise TypeError ファイルに書き出せないオブジェク...

絞り込み条件を変える