305件ヒット
[301-305件を表示]
(0.282秒)
ライブラリ
- ビルトイン (305)
クラス
-
ARGF
. class (8) - Array (18)
- BasicObject (1)
- Bignum (4)
- Complex (2)
- Dir (3)
-
Encoding
:: Converter (4) - Enumerator (1)
- File (1)
-
File
:: Stat (17) - Fixnum (3)
- Float (8)
- Hash (3)
- IO (14)
- Integer (66)
- MatchData (7)
- Method (3)
- Module (1)
- NilClass (1)
- Numeric (18)
- Object (7)
- Proc (3)
-
Process
:: Status (7) - Random (6)
- Range (2)
- Rational (8)
- Regexp (5)
-
RubyVM
:: InstructionSequence (1) - SignalException (1)
- String (23)
- Struct (6)
- Symbol (4)
- SystemCallError (1)
- SystemExit (1)
- Thread (5)
-
Thread
:: Backtrace :: Location (1) -
Thread
:: Mutex (1) -
Thread
:: Queue (3) -
Thread
:: SizedQueue (1) - Time (21)
- TracePoint (1)
- UnboundMethod (4)
モジュール
- Enumerable (10)
キーワード
- % (2)
- & (2)
- * (1)
- ** (1)
- + (1)
- - (1)
- -@ (4)
-
/ (1) - < (1)
- << (1)
- <= (1)
- <=> (3)
- == (1)
- === (1)
- =~ (3)
- > (1)
- >= (1)
- >> (2)
- [] (2)
- []= (1)
- ^ (1)
-
_ _ id _ _ (1) - abs (1)
-
add
_ trace _ func (1) - arity (3)
- begin (1)
-
bit
_ length (3) - blksize (1)
- blocks (1)
-
bsearch
_ index (2) - bytes (2)
- bytesize (1)
- ceil (4)
- chr (3)
- class (1)
- codepoints (2)
- coerce (1)
- count (7)
- day (1)
- denominator (5)
-
dev
_ major (1) -
dev
_ minor (1) - digits (2)
- div (2)
- divmod (3)
- downto (2)
- end (1)
- errno (1)
- even? (1)
- exitstatus (1)
- fcntl (1)
- fdiv (1)
- fileno (3)
-
find
_ index (6) -
first
_ lineno (1) - floor (4)
- gcd (1)
- gcdlcm (1)
- getbyte (3)
- gid (1)
-
gmt
_ offset (1) - gmtoff (1)
- hash (15)
- hex (1)
- hour (1)
- index (4)
- ino (1)
- inspect (1)
- integer? (2)
- ioctl (1)
- lcm (1)
- left (1)
- length (7)
- lineno (4)
- magnitude (1)
- match (1)
- max (1)
- mday (1)
- method (1)
- min (1)
- mode (1)
- modulo (1)
- mon (1)
- month (1)
-
named
_ captures (1) - next (1)
- nlink (1)
- nsec (1)
-
num
_ waiting (1) - numerator (4)
-
object
_ id (1) - oct (1)
- odd? (1)
- offset (2)
- ord (2)
- owner (1)
- pack (1)
- pid (2)
- pos (3)
- pow (2)
- pred (1)
-
primitive
_ convert (4) - priority (1)
- priority= (1)
-
public
_ method (1) - rand (3)
- rationalize (2)
- rdev (1)
-
rdev
_ major (1) -
rdev
_ minor (1) - readbyte (2)
- real? (1)
- remainder (1)
- rindex (4)
- round (4)
-
safe
_ level (1) - sec (1)
- seed (1)
-
set
_ trace _ func (1) - setbyte (1)
- signo (1)
-
singleton
_ class (1) - size (12)
- size? (1)
- sleep (1)
-
sort
_ by (2) -
source
_ location (3) - state (1)
- status (1)
- step (6)
- stopsig (1)
- subsec (1)
- succ (1)
- sum (3)
- sysseek (1)
- syswrite (1)
- tell (3)
- termsig (1)
- times (2)
-
to
_ f (2) -
to
_ i (10) -
to
_ int (3) -
to
_ r (1) -
to
_ s (1) - truncate (4)
-
tv
_ nsec (1) -
tv
_ sec (1) -
tv
_ usec (1) - uid (1)
- unpack (1)
- upto (2)
- usec (1)
-
utc
_ offset (1) -
values
_ at (1) - wday (1)
-
world
_ readable? (1) -
world
_ writable? (1) - write (2)
-
write
_ nonblock (1) - yday (1)
- year (1)
- | (1)
- ~ (2)
検索結果
先頭5件
-
Random
# rand -> Float (24010.0) -
一様な擬似乱数を発生させます。
一様な擬似乱数を発生させます。
最初の形式では 0.0 以上 1.0 未満の実数を返します。
二番目の形式では 0 以上 max 未満の数を返します。
max が正の整数なら整数を、正の実数なら実数を返します。
0 や負の数を指定することは出来ません。
三番目の形式では range で指定された範囲の値を返します。
range の始端と終端が共に整数の場合は整数を、少なくとも片方が実数の場合は実数を返します。
rangeが終端を含まない(つまり ... で生成した場合)には終端の値は乱数の範囲から除かれます。
range.end - range.begin が整数を返す場合は rang... -
Array
# bsearch _ index -> Enumerator (24007.0) -
ブロックの評価結果で範囲内の各要素の判定を行い、条件を満たす値の位置を 二分探索(計算量は O(log n))で検索します。要素が見つからない場合は nil を返します。self はあらかじめソートしておく必要があります。
ブロックの評価結果で範囲内の各要素の判定を行い、条件を満たす値の位置を
二分探索(計算量は O(log n))で検索します。要素が見つからない場合は nil
を返します。self はあらかじめソートしておく必要があります。
本メソッドはArray#bsearchと同様に、ブロックを評価した結果により2
つのモードで動作します。Array#bsearch との違いは見つかった要素自
身を返すか位置を返すかのみです。各モードのより詳細な違いについては
Array#bsearch を参照してください。
//emlist[例: find-minimum モード][ruby]{
ary = [0,... -
String
# bytes {|byte| . . . } -> self (24007.0) -
文字列の各バイトを数値の配列で返します。(self.each_byte.to_a と同じです)
文字列の各バイトを数値の配列で返します。(self.each_byte.to_a と同じです)
//emlist[例][ruby]{
"str".bytes # => [115, 116, 114]
//}
ブロックが指定された場合は String#each_byte と同じように動作します。
Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#each_byte -
String
# codepoints {|codepoint| block } -> self (24007.0) -
文字列の各コードポイントの配列を返します。(self.each_codepoint.to_a と同じです)
文字列の各コードポイントの配列を返します。(self.each_codepoint.to_a と同じです)
//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".codepoints
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
//}
ブロックが指定された場合は String#each_codepoint と同じように動作します。
Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#e... -
Thread
# priority=(val) (24007.0) -
スレッドの優先度を返します。この値が大きいほど優先度が高くなります。 メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの priority を引き継ぎます。
スレッドの優先度を返します。この値が大きいほど優先度が高くなります。
メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの
priority を引き継ぎます。
@param val スレッドの優先度を指定します。プラットフォームに依存します。
//emlist[例][ruby]{
Thread.current.priority # => 0
count1 = count2 = 0
a = Thread.new do
loop { count1 += 1 }
end
a.priority = -1
b = Thread.new do
...