658件ヒット
[1-100件を表示]
(0.070秒)
ライブラリ
- ビルトイン (280)
- date (72)
- openssl (48)
- prime (108)
-
racc
/ parser (12) -
rexml
/ document (60) -
rexml
/ parsers / pullparser (24) - socket (12)
- thwait (6)
- zlib (36)
クラス
- BasicSocket (12)
- Date (72)
-
Encoding
:: Converter (12) - Enumerator (72)
- Float (22)
- Integer (36)
- LocalJumpError (12)
- Object (30)
-
OpenSSL
:: OCSP :: BasicResponse (24) -
OpenSSL
:: X509 :: CRL (24) -
Prime
:: EratosthenesGenerator (36) -
Prime
:: Generator23 (24) -
Prime
:: PseudoPrimeGenerator (24) -
Prime
:: TrialDivisionGenerator (24) -
REXML
:: Child (36) -
REXML
:: Element (12) -
REXML
:: Parsers :: PullParser (24) -
Racc
:: Parser (12) -
RubyVM
:: InstructionSequence (12) - StopIteration (12)
- String (48)
- Symbol (24)
- ThreadsWait (6)
-
Zlib
:: Inflate (12) -
Zlib
:: ZStream (24)
モジュール
-
REXML
:: Node (12)
キーワード
- << (12)
- >> (12)
-
add
_ status (12) - empty? (12)
- feed (12)
-
flush
_ next _ in (12) -
flush
_ next _ out (12) - getpeereid (12)
-
has
_ next? (12) - next! (12)
-
next
_ day (12) -
next
_ element (12) -
next
_ float (11) -
next
_ month (12) -
next
_ sibling (12) -
next
_ sibling= (12) -
next
_ sibling _ node (12) -
next
_ token (12) -
next
_ update (12) -
next
_ update= (12) -
next
_ values (12) -
next
_ wait (6) -
next
_ year (12) - peek (12)
-
peek
_ values (12) - pred (12)
-
prev
_ float (11) -
previous
_ sibling= (12) -
primitive
_ errinfo (12) - reason (12)
- result (12)
- rewind (24)
- status (12)
- succ (96)
- succ! (12)
- then (14)
-
to
_ a (12) -
yield
_ self (16)
検索結果
先頭5件
-
Enumerator
# next -> object (18138.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
//}... -
Prime
:: EratosthenesGenerator # next -> Integer (18120.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 (18120.0) -
シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。
...シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。
(self.to_s.next.intern と同じです。)
:a.next # => :b
:foo.next # => :fop
@see String#succ... -
Integer
# next -> Integer (18114.0) -
self の次の整数を返します。
...self の次の整数を返します。
//emlist[][ruby]{
1.next #=> 2
(-1).next #=> 0
1.succ #=> 2
(-1).succ #=> 0
//}
@see Integer#pred... -
Date
# next -> Date (18102.0) -
翌日の日付オブジェクトを返します。
翌日の日付オブジェクトを返します。 -
Prime
:: Generator23 # next -> Integer (18102.0) -
次の擬似素数を返します。
次の擬似素数を返します。
また内部的な列挙位置を進めます。 -
Prime
:: PseudoPrimeGenerator # next -> () (18102.0) -
次の擬似素数を返します。 また内部的な位置を進めます。
次の擬似素数を返します。
また内部的な位置を進めます。
サブクラスで実装してください。
@raise NotImplementedError 必ず発生します。 -
Prime
:: TrialDivisionGenerator # next -> Integer (18102.0) -
次の(擬似)素数を返します。なお、この実装においては擬似素数は真に素数です。
次の(擬似)素数を返します。なお、この実装においては擬似素数は真に素数です。
また内部的な列挙位置を進めます。 -
String
# next -> String (18102.0) -
self の「次の」文字列を返します。
self の「次の」文字列を返します。
「次の」文字列は、対象の文字列の右端から
アルファベットなら アルファベット順(aの次はb, zの次はa, 大文字も同様)に、
数字なら 10 進数(9 の次は 0)とみなして計算されます。
//emlist[][ruby]{
p "aa".succ # => "ab"
p "88".succ.succ # => "90"
//}
"99" → "100", "AZZ" → "BAA" のような繰り上げも行われます。
このとき負符号などは考慮されません。
//emlist[][ruby]{
p "99".succ # =>...