3514件ヒット
[1-100件を表示]
(0.088秒)
種類
- インスタンスメソッド (1886)
- モジュール関数 (732)
- 定数 (658)
- 特異メソッド (227)
- クラス (11)
クラス
-
ARGF
. class (22) - Array (175)
- Binding (6)
- Complex (22)
- Data (2)
- Dir (22)
-
Encoding
:: Converter (44) - Enumerator (18)
-
Errno
:: EXXX (11) - File (77)
-
File
:: Stat (154) - Float (52)
- Hash (11)
- IO (117)
- Integer (186)
- MatchData (70)
- Method (22)
- Module (16)
- Mutex (2)
- Numeric (95)
- Object (77)
- Proc (33)
-
Process
:: Status (77) - Random (22)
- Range (11)
- Rational (44)
- Regexp (132)
- RubyVM (11)
-
RubyVM
:: AbstractSyntaxTree :: Node (24) -
RubyVM
:: InstructionSequence (11) - SignalException (11)
- String (193)
- Struct (33)
- Symbol (14)
- SystemCallError (11)
- SystemExit (11)
- Thread (44)
-
Thread
:: Mutex (9) - Time (220)
- TracePoint (11)
- UnboundMethod (22)
モジュール
- Enumerable (67)
-
File
:: Constants (42) - FileTest (11)
- Kernel (160)
- Marshal (22)
- Math (22)
- ObjectSpace (44)
- Process (748)
-
Process
:: GID (99) -
Process
:: Sys (44) -
Process
:: UID (99)
キーワード
- % (11)
- & (11)
- ** (11)
- << (19)
- <=> (22)
- =~ (33)
- >> (22)
- APPEND (11)
-
CLOCK
_ BOOTTIME (11) -
CLOCK
_ BOOTTIME _ ALARM (11) -
CLOCK
_ MONOTONIC (11) -
CLOCK
_ MONOTONIC _ COARSE (11) -
CLOCK
_ MONOTONIC _ FAST (11) -
CLOCK
_ MONOTONIC _ PRECISE (11) -
CLOCK
_ MONOTONIC _ RAW (11) -
CLOCK
_ MONOTONIC _ RAW _ APPROX (11) -
CLOCK
_ PROCESS _ CPUTIME _ ID (11) -
CLOCK
_ PROF (11) -
CLOCK
_ REALTIME (11) -
CLOCK
_ REALTIME _ ALARM (11) -
CLOCK
_ REALTIME _ COARSE (11) -
CLOCK
_ REALTIME _ FAST (11) -
CLOCK
_ REALTIME _ PRECISE (11) -
CLOCK
_ SECOND (11) -
CLOCK
_ THREAD _ CPUTIME _ ID (11) -
CLOCK
_ UPTIME (11) -
CLOCK
_ UPTIME _ FAST (11) -
CLOCK
_ UPTIME _ PRECISE (11) -
CLOCK
_ UPTIME _ RAW (11) -
CLOCK
_ UPTIME _ RAW _ APPROX (11) -
CLOCK
_ VIRTUAL (11) -
DEFAULT
_ PARAMS (11) - EXTENDED (11)
- Errno (11)
- FIXEDENCODING (11)
-
FNM
_ NOESCAPE (11) -
FNM
_ PATHNAME (11) - IGNORECASE (11)
-
MAJOR
_ VERSION (11) -
MAX
_ 10 _ EXP (11) -
MAX
_ EXP (11) -
MINOR
_ VERSION (11) -
MIN
_ 10 _ EXP (11) -
MIN
_ EXP (11) - MULTILINE (11)
- NOENCODING (11)
- Numeric (11)
-
PRIO
_ PGRP (11) -
PRIO
_ PROCESS (11) -
PRIO
_ USER (11) -
RLIMIT
_ AS (11) -
RLIMIT
_ CORE (11) -
RLIMIT
_ CPU (11) -
RLIMIT
_ DATA (11) -
RLIMIT
_ FSIZE (11) -
RLIMIT
_ MEMLOCK (11) -
RLIMIT
_ NOFILE (11) -
RLIMIT
_ NPROC (11) -
RLIMIT
_ RSS (11) -
RLIMIT
_ SBSIZE (11) -
RLIMIT
_ STACK (11) -
RLIM
_ INFINITY (11) -
RLIM
_ SAVED _ CUR (11) -
RLIM
_ SAVED _ MAX (11) -
RUBY
_ PATCHLEVEL (11) - Rational (6)
- TMPFILE (9)
- WNOHANG (11)
- WUNTRACED (11)
- [] (32)
-
add
_ trace _ func (11) - any? (42)
- arity (33)
- begin (11)
- binwrite (11)
- blksize (11)
- blocks (11)
- byteindex (2)
- byteoffset (4)
- byterindex (2)
- bytesize (11)
- ceil (11)
-
change
_ privilege (22) - chown (11)
- chr (33)
- class (11)
-
clock
_ gettime (11) - codepoints (22)
- compile (11)
- concat (16)
-
const
_ source _ location (5) -
copy
_ stream (22) - count (11)
- day (11)
- delete (11)
- denominator (11)
-
dev
_ major (11) -
dev
_ minor (11) - div (11)
-
each
_ object (44) - egid (11)
- eid (22)
- eid= (22)
- end (11)
- errno (11)
- euid (11)
- exitstatus (11)
-
find
_ index (33) -
first
_ column (6) -
first
_ lineno (17) - floor (11)
- fork (22)
- format (11)
- frexp (11)
-
from
_ name (22) - getegid (11)
- geteuid (11)
- getgid (11)
- getpgid (11)
- getpgrp (11)
- getpriority (11)
- getrlimit (11)
- getsid (11)
- getuid (11)
- gid (22)
-
gmt
_ offset (11) - gmtoff (11)
-
grant
_ privilege (22) - groups (11)
- hash (90)
- hex (11)
- hour (11)
- index (44)
- initgroups (11)
- ino (11)
- inspect (11)
- kill (11)
-
last
_ column (6) -
last
_ lineno (6) - lchown (11)
- length (22)
- lineno (11)
- match (3)
- maxgroups (11)
- maxgroups= (11)
- mday (11)
- method (11)
- min (11)
- mon (11)
- month (11)
-
named
_ captures (11) - new (29)
-
new
_ seed (11) - nlink (11)
- nsec (11)
-
object
_ id (11) - oct (11)
- offset (22)
- one? (13)
- ord (11)
- pack (19)
- pid (33)
- pos (33)
- pow (22)
- ppid (11)
- pred (11)
-
primitive
_ convert (44) - priority (11)
- priority= (11)
-
public
_ method (11) - putc (11)
- pwrite (7)
- rationalize (11)
- rdev (11)
-
rdev
_ major (11) -
rdev
_ minor (11) -
re
_ exchange (22) - rid (22)
- rindex (44)
- round (30)
- sec (11)
- seed (11)
-
set
_ trace _ func (11) - setsid (11)
- signo (11)
- size (55)
- size? (22)
- sleep (33)
-
sort
_ by (22) -
source
_ location (17) - spawn (55)
- sprintf (11)
- sqrt (11)
- srand (22)
- status (11)
- step (84)
- stopsig (11)
- subsec (11)
- sum (19)
- switch (44)
- sysopen (11)
- tally (6)
- tell (33)
- termsig (11)
- test (22)
-
to
_ f (11) -
to
_ i (44) -
to
_ int (11) -
to
_ s (11) - truncate (11)
-
tv
_ nsec (11) -
tv
_ sec (11) -
tv
_ usec (11) - uid (22)
- unlink (11)
- unpack (11)
- upto (22)
- usec (11)
-
utc
_ offset (11) -
values
_ at (11) - wait (11)
- wait2 (11)
- waitall (11)
- waitpid (11)
- waitpid2 (11)
- wday (11)
-
world
_ readable? (22) - write (22)
-
write
_ nonblock (11) - yday (11)
- year (11)
- ~ (11)
検索結果
先頭5件
-
Integer
# upto(max) {|n| . . . } -> Integer (27215.0) -
self から max まで 1 ずつ増やしながら繰り返します。 self > max であれば何もしません。
...self から max まで 1 ずつ増やしながら繰り返します。
self > max であれば何もしません。
@param max 数値
@return self を返します。
//emlist[][ruby]{
5.upto(10) {|i| print i, " " } # => 5 6 7 8 9 10
//}
@see Integer#downto, Numeric#step, Integer#times... -
Integer
# pred -> Integer (27209.0) -
self から -1 した値を返します。
...self から -1 した値を返します。
//emlist[][ruby]{
1.pred #=> 0
(-1).pred #=> -2
//}
@see Integer#next... -
Integer
# inspect(base=10) -> String (27126.0) -
整数を 10 進文字列表現に変換します。
...を基数とした文字列表
現に変換します。
//emlist[][ruby]{
p 10.to_s(2) # => "1010"
p 10.to_s(8) # => "12"
p 10.to_s(16) # => "a"
p 35.to_s(36) # => "z"
//}
@return 数値の文字列表現
@param base 基数となる 2 - 36 の数値。
@raise ArgumentError base に 2... -
Integer
# upto(max) -> Enumerator (27115.0) -
self から max まで 1 ずつ増やしながら繰り返します。 self > max であれば何もしません。
...self から max まで 1 ずつ増やしながら繰り返します。
self > max であれば何もしません。
@param max 数値
@return self を返します。
//emlist[][ruby]{
5.upto(10) {|i| print i, " " } # => 5 6 7 8 9 10
//}
@see Integer#downto, Numeric#step, Integer#times... -
Integer
# pow(other , modulo) -> Integer (24215.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) # => -7
//}
結果......数になりそうなとき、警告を出したうえで 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 (24115.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) # => -7
//}
結果......数になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power... -
Integer
# to _ s(base=10) -> String (24026.0) -
整数を 10 進文字列表現に変換します。
...を基数とした文字列表
現に変換します。
//emlist[][ruby]{
p 10.to_s(2) # => "1010"
p 10.to_s(8) # => "12"
p 10.to_s(16) # => "a"
p 35.to_s(36) # => "z"
//}
@return 数値の文字列表現
@param base 基数となる 2 - 36 の数値。
@raise ArgumentError base に 2... -
Integer
# round(ndigits = 0 , half: :up) -> Integer | Float (21209.0) -
self ともっとも近い整数を返します。
...。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
正の整数を指定した場合、Float を返します。
小数点以下を、最大 n 桁にします。
負の整数を指定した場合、Integer を返......小数点位置から左に少なくとも n 個の 0 が並びます。
@param half ちょうど半分の値の丸め方を指定します。
サポートされている値は以下の通りです。
* :up or nil: 0から遠い方に丸められます。
* :even: もっとも近い......d(-1) # => -20
25.round(-1, half: :up) # => 30
25.round(-1, half: :down) # => 20
25.round(-1, half: :even) # => 20
35.round(-1, half: :up) # => 40
35.round(-1, half: :down) # => 30
35.round(-1, half: :even) # => 40
(-25).round(-1, half: :up) # => -30
(-25).round(-1, half: :d... -
Integer
# round(ndigits = 0 , half: :up) -> Integer (21203.0) -
self ともっとも近い整数を返します。
...っとも近い整数を返します。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
負の整数を指定した場合、小数点位置から左に少なくとも n 個の 0 が並びます。
@param half ちょうど半分の値の丸め......:up or nil: 0から遠い方に丸められます。
* :even: もっとも近い偶数に丸められます。
* :down: 0に近い方に丸められます。
//emlist[][ruby]{
1.round # => 1
1.round(2) # => 1
15.round(-1) # => 20
(-15).round(-1) # => -20
25.round(-1, half: :up).......round(-1, half: :down) # => 20
25.round(-1, half: :even) # => 20
35.round(-1, half: :up) # => 40
35.round(-1, half: :down) # => 30
35.round(-1, half: :even) # => 40
(-25).round(-1, half: :up) # => -30
(-25).round(-1, half: :down) # => -20
(-25).round(-1, half: :even) # => -20
//}... -
Integer
# size -> Integer (21121.0) -
整数の実装上のサイズをバイト数で返します。
...整数の実装上のサイズをバイト数で返します。
//emlist[][ruby]{
p 1.size # => 8
p 0x1_0000_0000.size # => 8
//}
@see Integer#bit_length... -
Integer
# [](nth) -> Integer (21111.0) -
nth 番目のビット(最下位ビット(LSB)が 0 番目)が立っている時 1 を、そうでなければ 0 を返します。
...ビット(LSB)が 0 番目)が立っている時 1
を、そうでなければ 0 を返します。
@param nth 何ビット目を指すかの数値
@param len 何ビット分を返すか
@param range 返すビットの範囲
@return self[nth] は 1 か 0
@return self[i, len] は (n >> i......downto(0) {|n| print a[n] }
# => 0000000000000000011001100101010
a = 9**15
50.downto(0) {|n| print a[n] }
# => 000101110110100000111000011110010100111100010111001
//}
n[i] は (n >> i) & 1 と等価なので、負のインデックスは常に 0 を返します。
//emlist[][ruby]{
p 255[-1] # =>...