232件ヒット
[201-232件を表示]
(0.041秒)
別のキーワード
クラス
-
Encoding
:: Converter (12) - Enumerator (72)
- Float (22)
- Integer (36)
- Object (30)
-
RubyVM
:: InstructionSequence (12) - String (48)
キーワード
- feed (12)
- next! (12)
-
next
_ float (11) -
next
_ values (12) - peek (12)
-
peek
_ values (12) - pred (12)
-
prev
_ float (11) -
primitive
_ errinfo (12) - rewind (12)
- succ (24)
- succ! (12)
- then (14)
-
to
_ a (12) -
yield
_ self (16)
検索結果
先頭3件
-
Encoding
:: Converter # primitive _ errinfo -> Array (21.0) -
直前の Encoding::Converter#primitive_convert による変換の結果を保持する五要素の配列を返します。
...g::Converter#convert を用いている場合にも取得することはできますが、有用な使い方は難しいでしょう。
//emlist[][ruby]{
# \xff is invalid as EUC-JP.
ec = Encoding::Converter.new("EUC-JP", "Shift_JIS")
ec.primitive_convert(src="\xff", dst="", nil, 10)
p ec.primitive......\xd8\x00\x00@ is invalid as UTF-16BE because
# no low surrogate after high surrogate (\xd8\x00).
# It is detected by 3rd byte (\00) which is part of next character.
# So the high surrogate (\xd8\x00) is discarded and
# the 3rd byte is read again later.
# Since the byte is buffered in ec, it is dropp... -
Float
# prev _ float -> Float (21.0) -
浮動小数点数で表現可能な self の前の値を返します。
...oat と (-Float::INFINITY).prev_float
は -Float::INFINITY を返します。Float::NAN.prev_float は
Float::NAN を返します。
//emlist[例][ruby]{
p 0.01.prev_float # => 0.009999999999999998
p 1.0.prev_float # => 0.9999999999999999
p 100.0.prev_float # => 99.99999999999999
p 0.01 - 0.01.......47ae147ae146dp-7 0.009999999999999976
# 0x1.47ae147ae146cp-7 0.009999999999999974
# 0x1.47ae147ae146bp-7 0.009999999999999972
# 0x1.47ae147ae146ap-7 0.00999999999999997
# 0x1.47ae147ae1469p-7 0.009999999999999969
# 0x1.47ae147ae1468p-7 0.009999999999999967
//}
@see Float#next_float... -
Integer
# pred -> Integer (21.0) -
self から -1 した値を返します。
...self から -1 した値を返します。
//emlist[][ruby]{
1.pred #=> 0
(-1).pred #=> -2
//}
@see Integer#next...