るりまサーチ

最速Rubyリファレンスマニュアル検索!
1214件ヒット [1-100件を表示] (0.027秒)

別のキーワード

  1. prime next
  2. _builtin next
  3. date next
  4. date next_day
  5. date next_year

ライブラリ

モジュール

検索結果

<< 1 2 3 ... > >>

Fiddle::Handle::NEXT -> Fiddle::Handle (18117.0)

RTLD_NEXT で表わされる擬似ハンドルを表します。

...RTLD_NEXT で表わされる擬似ハンドルを表します。

詳しくは dlsym(3) を参照してください。...

Enumerator#next_values -> Array (6203.0)

「次」のオブジェクトを配列で返します。

...を配列で返します。

Enumerator#next とほぼ同様の挙動をします。終端まで到達した場合は
StopIteration 例外を発生させます。

このメソッドは、
yield

yield nil
を区別するために使えます。

next
メソッドによる外部列挙の状...
...list[例: next next_values の違いを][ruby]{
o = Object.new
def o.each
yield
yield 1
yield 1, 2
yield nil
yield [1, 2]
end
e = o.to_enum
p e.next_values
p e.next_values
p e.next_values
p e.next_values
p e.next_values
e = o.to_enum
p e.next
p e.next
p e.next
p e.next
p e.next

## yie...
...ld args next_values next
# yield [] nil
# yield 1 [1] 1
# yield 1, 2 [1, 2] [1, 2]
# yield nil [nil] nil
# yield [1, 2] [[1, 2]] [1, 2]
//}

@raise StopIteration 列挙状態が既に最後...

Float#next_float -> Float (6161.0)

浮動小数点数で表現可能な self の次の値を返します。

....next_float、Float::INFINITY.next_float は
Float::INFINITY を返します。Float::NAN.next_float は
Float::NAN を返します。

//emlist[例][ruby]{
p 0.01.next_float # => 0.010000000000000002
p 1.0.next_float # => 1.0000000000000002
p 100.0.next_float # => 100.00000000000001

p 0.01.next...
..._float - 0.01 # => 1.734723475976807e-18
p 1.0.next_float - 1.0 # => 2.220446049250313e-16
p 100.0.next_float - 100.0 # => 1.4210854715202004e-14

f = 0.01; 20.times { printf "%-20a %s\n", f, f.to_s; f = f.next_float }
# => 0x1.47ae147ae147bp-7 0.01
# 0x1.47ae147ae147cp-7 0.0100000000000000...

Enumerator#next -> object (6137.0)

「次」のオブジェクトを返します。

...合は、
StopIteration 例外を発生します。このとき列挙状態は変化しません。
つまりもう一度 next を呼ぶと再び例外が発生します。

next
メソッドによる外部列挙の状態は他のイテレータメソッドによる
内部列挙には影響を与え...
...enum.next
end
# => 120
# 121
# 122
//}

//emlist[例2][ruby]{
str = "xyz"
enum = str.each_byte

begin
puts enum.next while true
rescue StopIteration
puts "iteration reached at end"
end
# => 120
# 121
# 122
# iteration reached at end
puts enum.next...
...#=> 再度 StopIteration 例外が発生
//}

//emlist[例3: Kernel.#loop は StopIteration を捕捉します。][ruby]{
str = "xyz"
enum = str.each_byte
loop do
puts enum.next
end
# => 120
# 121
# 122
//}...

Date#next_year(n = 1) -> Date (6119.0)

n 年後を返します。

...n * 12) に相当します。

//emlist[例][ruby]{
require 'date'
Date.new(2001,2,3).next_year #=> #<Date: 2002-02-03 ...>
Date.new(2008,2,29).next_year #=> #<Date: 2009-02-28 ...>
Date.new(2008,2,29).next_year(4) #=> #<Date: 2012-02-29 ...>
//}

Date#>> も参照してください。

@p...

絞り込み条件を変える

Prime::EratosthenesGenerator#next -> Integer (6119.0)

次の(擬似)素数を返します。なお、この実装においては擬似素数は真に素数です。

...いては擬似素数は真に素数です。

また内部的な列挙位置を進めます。

//emlist[例][ruby]{
require 'prime'
generator = Prime::EratosthenesGenerator.new
p generator.next #=> 2
p generator.next #=> 3
p generator.succ #=> 5
p generator.succ #=> 7
p generator.next #=> 11
//}...

Symbol#next -> Symbol (6119.0)

シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。

...シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。

(self.to_s.next.intern と同じです。)

:a.next # => :b
:foo.next # => :fop

@see String#succ...

Socket::Constants::IPV6_NEXTHOP -> Integer (6116.0)

Next hop address。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

...Next hop address。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IPV6,
3542...

Socket::IPV6_NEXTHOP -> Integer (6116.0)

Next hop address。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

...Next hop address。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IPV6,
3542...
<< 1 2 3 ... > >>