るりまサーチ

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

別のキーワード

  1. _builtin nil?
  2. nilclass nil?
  3. object nil?
  4. object nil
  5. _builtin nil

検索結果

<< 1 2 3 ... > >>

GC.start(full_mark: true, immediate_sweep: true) -> nil (18320.0)

ガーベージコレクトを開始します。

...GC が禁止されている場合は何もしません。

nil
を返します。

@param full_mark マイナー GC を動作させる場合は false を、そうでない場
合は true を指定します。

@param immediate_sweep sweep を遅らせる(Lazy Sweep を行う)場合...
...す。将来のバージョンとの互換性も保証されません。また、Ruby の実装がサポー
トしていない場合はキーワード引数を指定しても無視される可能性があります。

//emlist[例][ruby]{
GC.count # => 3
GC.start # => nil
GC.count # => 4
//}...
...場合でもガベージコレクトを開始します。

nil
を返します。

@param full_mark マイナー GC を動作させる場合は false を、そうでない場
合は true を指定します。

@param immediate_sweep sweep を遅らせる(Lazy Sweep を行う)場合...

IRB.start(ap_path = nil) -> () (18302.0)

IRB を初期化して、トップレベルの irb を開始します。

...IRB を初期化して、トップレベルの irb を開始します。

@param ap_path irb コマンドのパスを指定します。...

Array#at(nth) -> object | nil (15244.0)

nth 番目の要素を返します。nth 番目の要素が存在しない時には nil を返します。

...nth 番目の要素を返します。nth 番目の要素が存在しない時には nil を返します。

@param nth インデックスを整数で指定します。
先頭の要素が 0 番目になります。nth の値が負の時には末尾から
のインデックス...
...みます。

@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
a = [ "a", "b", "c", "d", "e" ]
a[0] #=> "a"
a[1] #=> "b"
a[-1] #=> "e"
a[-2] #=> "d"
a[10] #=> nil
//}...

ObjectSpace.#trace_object_allocations_start -> nil (12302.0)

オブジェクト割り当てのトレースを開始します。

...オブジェクト割り当てのトレースを開始します。

@see ObjectSpace.#trace_object_allocations_stop...

Kernel.#caller_locations(start = 1, length = nil) -> [Thread::Backtrace::Location] | nil (6568.0)

現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。

...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。

@param start 開始フレームの位置を数値で指定します。

@param length 取得するフレームの個数を指定します。

@pa...
...{
def test1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end

def test2(start, length)
test1(start, length)
end

def test3(start, length)
test2(start, length)
end

caller_locations # => []
test3(1, nil)
# => ["/U...
...(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}

@see Thread::Backtrace::Location, Kernel.#caller...

絞り込み条件を変える

Thread#backtrace_locations(start = 0, length = nil) -> [Thread::Backtrace::Location] | nil (6516.0)

スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。

...ドの現在のバックトレースを Thread::Backtrace::Location の配
列で返します。

引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。

@param start 開始フレームの位置を数値で指定します。

@param...
...します。

Kernel.#caller_locations と似ていますが、本メソッドは self に限定
した情報を返します。

//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locations # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"...
...]
//}

@see Thread::Backtrace::Location...

Kernel.#caller_locations(range) -> [Thread::Backtrace::Location] | nil (6368.0)

現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。

...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。

@param start 開始フレームの位置を数値で指定します。

@param length 取得するフレームの個数を指定します。

@pa...
...{
def test1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end

def test2(start, length)
test1(start, length)
end

def test3(start, length)
test2(start, length)
end

caller_locations # => []
test3(1, nil)
# => ["/U...
...(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}

@see Thread::Backtrace::Location, Kernel.#caller...

Thread#backtrace_locations(range) -> [Thread::Backtrace::Location] | nil (6316.0)

スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。

...ドの現在のバックトレースを Thread::Backtrace::Location の配
列で返します。

引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。

@param start 開始フレームの位置を数値で指定します。

@param...
...します。

Kernel.#caller_locations と似ていますが、本メソッドは self に限定
した情報を返します。

//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locations # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"...
...]
//}

@see Thread::Backtrace::Location...

MatchData#byteoffset(name) -> [Integer, Integer] | [nil, nil] (6247.0)

name という名前付きグループに対応する部分文字列のバイト単位のオフセットの 配列 [start, end] を返します。

...グループに対応する部分文字列のバイト単位のオフセットの
配列 [start, end] を返します。

nameの名前付きグループにマッチした部分文字列がなければ
[nil, nil] を返します。

@param name 名前(シンボルか文字列)

@raise IndexError 正...
...') # => [0, 4]
p $~.byteoffset(:year) # => [0, 4]
p $~.byteoffset('month') # => [7, 8]
p $~.byteoffset(:month) # => [7, 8]
p $~.byteoffset('day') # => [nil, nil]
p $~.byteoffset('century') # => `offset': undefined group name reference: century (IndexError)
//}

@see MatchData#offset...

MatchData#offset(name) -> [Integer, Integer] | [nil, nil] (6247.0)

name という名前付きグループに対応する部分文字列のオフセットの配列 [start, end] を返 します。

...る部分文字列のオフセットの配列 [start, end] を返
します。

//emlist[例][ruby]{
[ self.begin(name), self.end(name) ]
//}

と同じです。nameの名前付きグループにマッチした部分文字列がなければ
[nil, nil] を返します。

@param name 名前(シンボ...
...('year') # => [0, 4]
p $~.offset(:year) # => [0, 4]
p $~.offset('month') # => [5, 6]
p $~.offset(:month) # => [5, 6]
p $~.offset('day') # => [nil, nil]
p $~.offset('century') # => `offset': undefined group name reference: century (IndexError)
//}

@see MatchData#begin, MatchData#end...
...0, 4]
p $~.offset(:year) # => [0, 4]
p $~.offset('month') # => [5, 6]
p $~.offset(:month) # => [5, 6]
p $~.offset('day') # => [nil, nil]
p $~.offset('century') # => `offset': undefined group name reference: century (IndexError)
//}

@see MatchData#begin, MatchData#end, MatchData#offset...

絞り込み条件を変える

<< 1 2 3 ... > >>