759件ヒット
[1-100件を表示]
(0.078秒)
クラス
- Array (486)
- Float (21)
- Integer (36)
- Range (72)
- Rational (60)
- Regexp (12)
-
Socket
:: AncillaryData (24) -
Socket
:: Option (36) - String (12)
キーワード
- * (24)
- ** (12)
- =~ (24)
- [] (36)
- []= (36)
- at (12)
- begin (12)
- bool (12)
- ceil (12)
- combination (24)
- cycle (24)
-
delete
_ at (12) - end (12)
- fetch (36)
- first (48)
- flatten (12)
- flatten! (12)
- floor (12)
- insert (12)
- intersection (6)
-
ip
_ pktinfo (12) - last (48)
- linger (12)
- permutation (24)
- pop (24)
- pow (24)
-
repeated
_ combination (24) -
repeated
_ permutation (24) - rotate (12)
- rotate! (12)
- round (33)
- sample (48)
- shift (24)
-
to
_ i (12) - truncate (12)
検索結果
先頭5件
-
Socket
:: AncillaryData # int -> Integer (18232.0) -
自身が保持している cmsg data (データ) を整数の形で返します。
...異なります。
require 'socket'
ancdata = Socket::AncillaryData.int(:UNIX, :SOCKET, :RIGHTS, STDERR.fileno)
p ancdata.int #=> 2
@raise TypeError cmgs data のサイズが int のバイト数と異なる場合に発生します
@see Socket::AncillaryData.new Socket::AncillaryData.int... -
Socket
:: Option # int -> Integer (18214.0) -
オプションのデータ(内容)を整数に変換して返します。
...オプションのデータ(内容)を整数に変換して返します。
@raise TypeError dataのバイト数が不適切である(sizeof(int)と異なる)場合に発生します
@see Socket::Option#data... -
Array
# intersection(*other _ arrays) -> Array (6107.0) -
自身と引数に渡された配列の共通要素を新しい配列として返します。 要素が重複する場合は、そのうちの1つのみを返します。 要素の順序は自身の順序を維持します。
...ます。
@raise TypeError 引数に配列以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
intersectionはObject#hashとObject#eql?を使って比較を行います。
//emlist[例][ruby]{
[1, 1, 3, 5].intersection([3, 2, 1......]) # => [1, 3]
["a", "b", "z"].intersection(["a", "b", "c"], ["b"]) # => ["b"]
["a"].intersection # => ["a"]
//}
@see Set#intersection, Array#&... -
Integer
# pow(other , modulo) -> Integer (3107.0) -
算術演算子。冪(べき乗)を計算します。
...、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生... -
Integer
# **(other) -> Numeric (3007.0) -
算術演算子。冪(べき乗)を計算します。
...、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生... -
Integer
# pow(other) -> Numeric (3007.0) -
算術演算子。冪(べき乗)を計算します。
...、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生... -
Regexp
# =~(string) -> Integer | nil (113.0) -
文字列 string との正規表現マッチを行います。マッチした場合、 マッチした位置のインデックスを返します(先頭は0)。マッチしなかった 場合、あるいは string が nil の場合には nil を返 します。
...定されます。
文字列のかわりにSymbolをマッチさせることができます。
@param string マッチ対象文字列
@raise TypeError string が nil でも String オブジェクト
でも Symbol でもない場合発生します。
//emlist[例][ruby]{
p /foo/......foo/ =~ "afoo" # => 1
p $~[0] # => "foo"
p /foo/ =~ "bar" # => nil
unless /foo/ === "bar"
puts "not match " # => not match
end
str = []
begin
/ugo/ =~ str
rescue TypeError
printf "! %s\t%s\n", $!, $@ # => ! can't convert Array into String r5.rb:15
end
//}... -
Float
# round(ndigits = 0) -> Integer | Float (107.0) -
自身ともっとも近い整数もしくは実数を返します。
...ndigitsが0より大きいならば、実数を返します。
ndigitsが0より小さいならば、整数を返します。
@raise TypeError ndigits で指定されたオブジェクトが整数に変換できない場
合発生します。
//emlist[例][ruby]{
1.0.r... -
Float
# round(ndigits = 0 , half: :up) -> Integer | Float (107.0) -
自身ともっとも近い整数もしくは実数を返します。
...ndigitsが0より大きいならば、実数を返します。
ndigitsが0より小さいならば、整数を返します。
@raise TypeError ndigits で指定されたオブジェクトが整数に変換できない場
合発生します。
//emlist[例][ruby]{
1.0.r... -
Rational
# ceil(precision = 0) -> Integer | Rational (107.0) -
自身と等しいかより大きな整数のうち最小のものを返します。
...自身と等しいかより大きな整数のうち最小のものを返します。
@param precision 計算結果の精度
@raise TypeError precision に整数以外のものを指定すると発生します。
//emlist[例][ruby]{
Rational(3).ceil # => 3
Rational(2, 3).ceil # => 1
Ratio...