1796件ヒット
[1-100件を表示]
(0.045秒)
別のキーワード
クラス
- Array (181)
- BasicObject (48)
- Class (12)
- Complex (24)
- Data (3)
-
Encoding
:: Converter (48) - Enumerator (60)
- Fiber (16)
- File (12)
- Float (54)
- Hash (54)
- IO (32)
- Integer (60)
- MatchData (12)
- Method (70)
- Module (252)
- Numeric (60)
- Object (144)
- Proc (98)
- Range (7)
- Rational (24)
- Regexp (24)
- String (258)
- Struct (12)
- Symbol (12)
- Time (26)
モジュール
- Enumerable (193)
キーワード
- % (26)
- ** (48)
- + (12)
- << (14)
- === (32)
- >> (14)
- [] (24)
-
_ _ send _ _ (24) - advise (12)
-
alias
_ method (12) - append (8)
- attr (12)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) - call (36)
- capitalize (9)
- capitalize! (9)
-
class
_ exec (12) - concat (18)
- count (12)
- crypt (12)
- curry (24)
-
deconstruct
_ keys (2) - delete (12)
- delete! (12)
-
deprecate
_ constant (12) - div (12)
- divmod (24)
- downcase (9)
- downcase! (9)
- each (48)
-
each
_ with _ index (24) -
each
_ with _ object (24) - encode (36)
-
end
_ with? (18) - entries (12)
-
enum
_ for (24) - extend (12)
-
fetch
_ values (2) - flock (12)
-
grep
_ v (24) - include (12)
- initialize (12)
- insert (12)
-
instance
_ exec (12) - intersection (6)
- match (24)
-
max
_ by (48) - merge (14)
- merge! (14)
-
method
_ missing (12) -
module
_ exec (12) -
module
_ function (12) - modulo (12)
- new (12)
- overlap? (2)
- pack (21)
- parameters (24)
- pow (24)
- prepend (29)
-
primitive
_ convert (48) - print (12)
- private (12)
-
private
_ class _ method (12) -
private
_ constant (12) - product (24)
- public (12)
-
public
_ class _ method (12) -
public
_ constant (12) -
public
_ send (24) - push (12)
- refine (12)
- remainder (12)
-
remove
_ method (12) -
respond
_ to _ missing? (12) - resume (12)
- round (30)
- send (24)
- squeeze (12)
- squeeze! (12)
-
start
_ with? (18) - step (3)
- strftime (12)
- swapcase (9)
- swapcase! (9)
-
to
_ a (12) -
to
_ enum (24) -
to
_ h (19) -
to
_ set (6) - transfer (4)
-
undef
_ method (12) - union (7)
- unpack (12)
- unshift (12)
- upcase (9)
- upcase! (9)
- update (14)
- using (12)
-
values
_ at (48) - with (3)
-
with
_ object (12) - write (8)
- yield (12)
- zip (48)
検索結果
先頭5件
-
Rational
# *(other) -> Rational | Float (18139.0) -
積を計算します。
...算します。
@param other 自身に掛ける数
other に Float を指定した場合は、計算結果を Float で返しま
す。
//emlist[例][ruby]{
r = Rational(3, 4)
r * 2 # => (3/2)
r * 4 # => (3/1)
r * 0.5 # => 0.375
r * Rational(1, 2) # =>... -
Complex
# *(other) -> Complex (18133.0) -
積を計算します。
...積を計算します。
@param other 自身に掛ける数
//emlist[例][ruby]{
Complex(1, 2) * 2 # => (2+4i)
Complex(1, 2) * Complex(2, 3) # => (-4+7i)
Complex(1, 2) * Rational(1, 2) # => ((1/2)+(1/1)*i)
//}... -
String
# *(times) -> String (18133.0) -
文字列の内容を times 回だけ繰り返した新しい文字列を作成して返します。
...ます。
@param times 整数
@return self を times 回繰り返した新しい文字列
@raise ArgumentError 引数に負数を指定したときに発生します。
//emlist[例][ruby]{
p "str" * 3 # => "strstrstr"
str = "abc"
p str * 4 # => "abcabcabcabc"
p str * 0 # => ""... -
Array
# *(sep) -> String (18124.0) -
指定された sep を間にはさんで連結した文字列を生成して返します。Array#join(sep) と同じ動作をします。
...(sep) と同じ動作をします。
@param sep 文字列を指定します。
文字列以外のオブジェクトを指定した場合は to_str メソッドによ
る暗黙の型変換を試みます。
//emlist[例][ruby]{
p [1,2,3] * ","
# => "1,2,3"
//}
@see Array#join... -
Array
# *(times) -> Array (18124.0) -
配列の内容を times 回 繰り返した新しい配列を作成して返します。 値はコピーされないことに注意してください。
...内容を times 回 繰り返した新しい配列を作成して返します。
値はコピーされないことに注意してください。
@param times 繰り返したい回数を整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソ......or 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
@raise ArgumentError 引数に負の数を指定した場合に発生します。
//emlist[例][ruby]{
p [1, 2, 3] * 3 #=> [1, 2, 3, 1, 2, 3, 1, 2, 3]
//}... -
Float
# *(other) -> Float (18121.0) -
算術演算子。積を計算します。
...算術演算子。積を計算します。
@param other 二項演算の右側の引数(対象)
//emlist[例][ruby]{
# 積
2.4 * 3 # => 7.2
//}... -
Integer
# *(other) -> Numeric (18121.0) -
算術演算子。積を計算します。
...算術演算子。積を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果
//emlist[][ruby]{
2 * 3 # => 6
//}... -
Proc
# parameters(lambda: nil) -> [object] (6157.0) -
Proc オブジェクトの引数の情報を返します。
...st
* で指定された残りすべての引数
: :keyreq
必須のキーワード引数
: :key
デフォルト値が指定されたオプショナルなキーワード引数
: :keyrest
** で指定された残りのキーワード引数
: :block
& で指定されたブロック引数
@param l......//emlist[例][ruby]{
prc = lambda{|x, y=42, *other, k_x:, k_y: 42, **k_other, &b|}
prc.parameters #=> x], [:opt, :y], [:rest, :other], [:keyreq, :k_x], [:key, :k_y], [:keyrest, :k_other], [:block, :b
//}
//emlist[lambda: の例][ruby]{
prc = proc{|x, y=42, *other|}
p prc.parameters # => x], [:op......x, y=42, *other|}
p prc.parameters # => x], [:opt, :y], [:rest, :other
prc = proc{|x, y=42, *other|}
p prc.parameters(lambda: true) # => x], [:opt, :y], [:rest, :other
prc = lambda{|x, y=42, *other|}
p prc.parameters(lambda: false) # => x], [:opt, :y], [:rest, :other
//}
@see Method#parameters, U... -
Integer
# **(other) -> Numeric (6127.0) -
算術演算子。冪(べき乗)を計算します。
...算術演算子。冪(べき乗)を計算します。
@param other 二項演算の右側の引数(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Int......に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8)......になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power......た場合に発生します。
@raise ArgumentError 計算結果が巨大になりすぎる場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -......8) # => -7
//}
計算結果が巨大すぎるときは ArgumentError が発生します。
//emlist[計算結果が巨大すぎる例][ruby]{
p 100**9999999999999999999
# => exponent is too large (ArgumentError)
//}
判定の閾値は変わりえます。
@see BigDecimal#power... -
Float
# **(other) -> Float (6121.0) -
算術演算子。冪を計算します。
...算術演算子。冪を計算します。
@param other 二項演算の右側の引数(対象)
//emlist[例][ruby]{
# 冪
1.2 ** 3.0 # => 1.7279999999999998
3.0 + 4.5 - 1.3 / 2.4 * 3 % 1.2 ** 3.0 # => 5.875
0.0 ** 0 # => 1.0
//}...