2329件ヒット
[1-100件を表示]
(0.062秒)
別のキーワード
クラス
-
ARGF
. class (12) - Array (326)
- BasicObject (72)
- Class (12)
- Complex (24)
- Data (3)
-
Encoding
:: Converter (48) - Enumerator (60)
-
Enumerator
:: Lazy (60) - Exception (12)
- Fiber (16)
- File (12)
- Float (54)
- Hash (102)
- IO (32)
- Integer (60)
- MatchData (12)
- Method (70)
- Module (252)
- Numeric (60)
- Object (188)
- Proc (98)
- Range (31)
- Rational (24)
- Regexp (24)
- String (295)
- Struct (12)
- Symbol (12)
- Time (26)
- UnboundMethod (12)
モジュール
- Enumerable (308)
キーワード
- ! (12)
- % (26)
- ** (48)
- + (12)
- << (14)
- === (32)
- >> (14)
- [] (24)
-
_ _ id _ _ (12) -
_ _ send _ _ (24) - advise (12)
-
alias
_ method (12) - append (8)
-
append
_ as _ bytes (1) - attr (12)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) - backtrace (12)
-
bind
_ call (12) - binmode (12)
- bsearch (48)
- call (36)
- capitalize (9)
- capitalize! (9)
- chain (7)
- chunk (12)
-
class
_ exec (12) - collect (48)
- collect! (24)
-
collect
_ concat (12) - concat (18)
- count (12)
- crypt (12)
- curry (24)
-
deconstruct
_ keys (2) - delete (12)
- delete! (12)
-
deprecate
_ constant (12) - difference (7)
- 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) - except (4)
- extend (12)
-
fetch
_ values (2) -
filter
_ map (18) -
flat
_ map (12) - flock (12)
-
grep
_ v (24) - include (12)
- initialize (12)
- insert (12)
-
instance
_ exec (12) - intersection (6)
- lazy (12)
- map (48)
- map! (24)
- 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)
- slice (8)
- squeeze (12)
- squeeze! (12)
-
start
_ with? (18) - step (3)
- strftime (12)
- sum (42)
- swapcase (9)
- swapcase! (9)
- tap (8)
-
to
_ a (12) -
to
_ ary (12) -
to
_ c (12) -
to
_ enum (24) -
to
_ f (12) -
to
_ h (19) -
to
_ int (12) -
to
_ r (12) -
to
_ set (6) -
to
_ str (12) - transfer (4)
-
transform
_ values (18) -
transform
_ values! (18) -
undef
_ method (12) - union (7)
- unpack (12)
- unshift (12)
- upcase (9)
- upcase! (9)
- update (14)
- using (12)
-
values
_ at (48) - with (3)
-
with
_ index (6) -
with
_ object (12) - write (8)
- yield (12)
- zip (72)
検索結果
先頭5件
-
String
# *(times) -> String (18145.0) -
文字列の内容を times 回だけ繰り返した新しい文字列を作成して返します。
...ます。
@param times 整数
@return self を times 回繰り返した新しい文字列
@raise ArgumentError 引数に負数を指定したときに発生します。
//emlist[例][ruby]{
p "str" * 3 # => "strstrstr"
str = "abc"
p str * 4 # => "abcabcabcabc"
p str * 0 # => ""... -
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) #... -
Array
# *(times) -> Array (18137.0) -
配列の内容を times 回 繰り返した新しい配列を作成して返します。 値はコピーされないことに注意してください。
...いことに注意してください。
@param times 繰り返したい回数を整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによ
る暗黙の型変換を試みます。
@raise TypeError 引数に整数以外......の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
@raise ArgumentError 引数に負の数を指定した場合に発生します。
//emlist[例][ruby]{
p [1, 2, 3] * 3 #=> [1, 2, 3, 1, 2, 3, 1, 2, 3]
//}... -
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)
//}... -
Array
# *(sep) -> String (18132.0) -
指定された sep を間にはさんで連結した文字列を生成して返します。Array#join(sep) と同じ動作をします。
...ep) と同じ動作をします。
@param sep 文字列を指定します。
文字列以外のオブジェクトを指定した場合は to_str メソッドによ
る暗黙の型変換を試みます。
//emlist[例][ruby]{
p [1,2,3] * ","
# => "1,2,3"
//}
@see Array#join... -
Integer
# *(other) -> Numeric (18127.0) -
算術演算子。積を計算します。
...算術演算子。積を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果
//emlist[][ruby]{
2 * 3 # => 6
//}... -
Float
# *(other) -> Float (18121.0) -
算術演算子。積を計算します。
...算術演算子。積を計算します。
@param other 二項演算の右側の引数(対象)
//emlist[例][ruby]{
# 積
2.4 * 3 # => 7.2
//}... -
Integer
# **(other) -> Numeric (6157.0) -
算術演算子。冪(べき乗)を計算します。
...算子。冪(べき乗)を計算します。
@param other 二項演算の右側の引数(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以......に発生します。
@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......ror 2引数 pow で other に負の数を指定した場合に発生します。
@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.p......> -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
//}...