162件ヒット
[101-162件を表示]
(0.052秒)
別のキーワード
ライブラリ
- ビルトイン (114)
-
rake
/ testtask (12) - ripper (12)
-
rubygems
/ user _ interaction (24)
クラス
-
Gem
:: StreamUI (12) - Hash (36)
- IO (12)
- Integer (33)
- Module (24)
-
Rake
:: TestTask (12) - Ripper (12)
モジュール
-
Gem
:: UserInteraction (12) - Warning (9)
キーワード
- ** (11)
-
alert
_ warning (24) -
const
_ set (12) -
deprecate
_ constant (12) - fetch (36)
- pow (22)
- sysseek (12)
- warn (9)
- warning= (12)
検索結果
先頭5件
-
Hash
# fetch(key) {|key| . . . } -> object (19.0) -
key に関連づけられた値を返します。該当するキーが登録されてい ない時には、引数 default が与えられていればその値を、ブロッ クが与えられていればそのブロックを評価した値を返します。
...自身にデフォルト値が設定されていても単に無視します(挙動に変化がありません)。
@param key 探索するキーを指定します。
@param default 該当するキーが登録されていない時の返り値を指定します。
@raise KeyError 引数default......ey|"#{key} not exist"} #=> "two not exist"
p h.fetch(:two, "error"){|key| #=> "two not exist"
"#{key} not exist" # warning: block supersedes default value argument
} # 警告が表示される。
h.default = "default"
p h.fetc... -
Hash
# fetch(key , default) -> object (19.0) -
key に関連づけられた値を返します。該当するキーが登録されてい ない時には、引数 default が与えられていればその値を、ブロッ クが与えられていればそのブロックを評価した値を返します。
...自身にデフォルト値が設定されていても単に無視します(挙動に変化がありません)。
@param key 探索するキーを指定します。
@param default 該当するキーが登録されていない時の返り値を指定します。
@raise KeyError 引数default......ey|"#{key} not exist"} #=> "two not exist"
p h.fetch(:two, "error"){|key| #=> "two not exist"
"#{key} not exist" # warning: block supersedes default value argument
} # 警告が表示される。
h.default = "default"
p h.fetc... -
IO
# sysseek(offset , whence = IO :: SEEK _ SET) -> Integer (19.0) -
lseek(2) と同じです。IO#seek では、 IO#sysread, IO#syswrite と併用すると正しく動作しないので代わりにこのメソッドを使います。 位置 offset への移動が成功すれば移動した位置(ファイル先頭からのオフセット)を返します。
...open("/dev/null", "w") {|f|
f.print "foo"
f.sysseek(0)
}
# => -:3: warning: sysseek for buffered IO
@param offset ファイルポインタを移動させるオフセットを整数で指定します。
@param whence 値は以下のいずれかです。
それぞれ代わ... -
Integer
# **(other) -> Numeric (19.0) -
算術演算子。冪(べき乗)を計算します。
...算術演算子。冪(べき乗)を計算します。
@param other 二項演算の右側の引数(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Int......になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power... -
Integer
# pow(other) -> Numeric (19.0) -
算術演算子。冪(べき乗)を計算します。
...算術演算子。冪(べき乗)を計算します。
@param other 二項演算の右側の引数(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Int......になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power... -
Integer
# pow(other , modulo) -> Integer (19.0) -
算術演算子。冪(べき乗)を計算します。
...算術演算子。冪(べき乗)を計算します。
@param other 二項演算の右側の引数(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Int......になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power...