6004件ヒット
[1-100件を表示]
(0.072秒)
クラス
-
ARGF
. class (88) - Array (265)
- BasicObject (11)
- Bignum (12)
- Binding (6)
- Complex (22)
- Data (2)
- Dir (32)
-
Encoding
:: Converter (44) - Enumerator (29)
-
Enumerator
:: ArithmeticSequence (12) -
Enumerator
:: Chain (6) -
Errno
:: EXXX (11) - File (150)
-
File
:: Stat (187) - Fixnum (9)
- Float (180)
- Hash (33)
- IO (290)
- Integer (768)
- MatchData (81)
- Method (33)
- Module (16)
- Mutex (2)
- NilClass (11)
- Numeric (216)
- Object (94)
- Proc (33)
-
Process
:: Status (77) - Random (154)
- Range (22)
- Rational (88)
- Regexp (132)
- RubyVM (11)
-
RubyVM
:: AbstractSyntaxTree :: Node (24) -
RubyVM
:: InstructionSequence (11) - SignalException (11)
- String (281)
- Struct (66)
- Symbol (36)
- SystemCallError (11)
- SystemExit (11)
- Thread (73)
-
Thread
:: Backtrace :: Location (11) -
Thread
:: Mutex (9) -
Thread
:: Queue (27) -
Thread
:: SizedQueue (23) - Time (278)
- TracePoint (11)
- UnboundMethod (44)
モジュール
- Enumerable (158)
-
File
:: Constants (304) - FileTest (33)
- GC (44)
- Kernel (249)
- Marshal (22)
- Math (33)
- ObjectSpace (44)
- Process (748)
-
Process
:: GID (99) -
Process
:: Sys (44) -
Process
:: UID (99)
オブジェクト
- ENV (22)
キーワード
-
$ $ (11) -
$ . (11) -
$ SAFE (7) - % (22)
- & (22)
- * (11)
- ** (11)
- + (11)
- - (11)
- -@ (28)
-
/ (10) - < (11)
- << (27)
- <= (11)
- <=> (33)
- == (11)
- === (11)
- =~ (33)
- > (11)
- >= (11)
- >> (22)
- APPEND (11)
- BINARY (11)
- Bignum (9)
-
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) - CREAT (11)
- DEBUG (11)
- DEBUG= (11)
-
DEFAULT
_ PARAMS (11) - DIG (11)
- DIRECT (11)
- DSYNC (11)
- EXCL (11)
- EXTENDED (11)
- Errno (11)
- FIXEDENCODING (11)
-
FNM
_ CASEFOLD (11) -
FNM
_ DOTMATCH (11) -
FNM
_ EXTGLOB (11) -
FNM
_ NOESCAPE (11) -
FNM
_ PATHNAME (11) -
FNM
_ SYSCASE (11) - Fixnum (9)
- IGNORECASE (11)
-
INTERNAL
_ CONSTANTS (11) -
LOCK
_ EX (11) -
LOCK
_ NB (11) -
LOCK
_ SH (11) -
LOCK
_ UN (11) -
MAJOR
_ VERSION (11) -
MANT
_ DIG (11) -
MAX
_ 10 _ EXP (11) -
MAX
_ EXP (11) -
MINOR
_ VERSION (11) -
MIN
_ 10 _ EXP (11) -
MIN
_ EXP (11) - MULTILINE (11)
- NOATIME (11)
- NOCTTY (11)
- NOENCODING (11)
- NOFOLLOW (11)
- NONBLOCK (11)
- Numeric (11)
-
PRIO
_ PGRP (11) -
PRIO
_ PROCESS (11) -
PRIO
_ USER (11) - RADIX (11)
- RDONLY (11)
- RDWR (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) - ROUNDS (7)
- RSYNC (11)
-
RUBY
_ PATCHLEVEL (11) -
RUBY
_ REVISION (6) - Rational (22)
-
SEEK
_ CUR (11) -
SEEK
_ DATA (11) -
SEEK
_ END (11) -
SEEK
_ HOLE (11) -
SEEK
_ SET (11) -
SHARE
_ DELETE (9) - SYNC (11)
- TMPFILE (9)
- TRUNC (11)
- WNOHANG (11)
- WRONLY (11)
- WUNTRACED (11)
- [] (32)
- []= (11)
- ^ (11)
-
_ _ id _ _ (11) - abs (11)
-
add
_ trace _ func (11) - allbits? (7)
- any? (42)
- anybits? (7)
- arity (33)
- at (47)
- begin (11)
- binwrite (11)
-
bit
_ length (17) - blksize (11)
- blocks (11)
-
bsearch
_ index (18) - byteindex (2)
- byteoffset (4)
- byterindex (2)
- bytes (22)
- bytesize (11)
- ceil (44)
- ceildiv (2)
-
change
_ privilege (22) - chmod (11)
- chown (11)
- chr (33)
- class (11)
-
clock
_ gettime (11) - codepoints (22)
- coerce (11)
- compile (11)
- concat (16)
-
const
_ source _ location (5) -
copy
_ stream (22) - count (88)
- day (11)
- delete (11)
- denominator (55)
-
dev
_ major (11) -
dev
_ minor (11) - dig (8)
- digits (22)
- div (22)
- divmod (17)
- downto (22)
-
each
_ object (44) - egid (11)
- eid (22)
- eid= (22)
- end (11)
- errno (11)
- euid (11)
- even? (11)
- exitstatus (11)
- fcntl (11)
- fdiv (11)
- fileno (32)
-
find
_ index (66) -
first
_ column (6) -
first
_ lineno (17) - floor (44)
- fork (44)
- format (11)
- frexp (11)
-
from
_ name (22) - gcd (11)
- gcdlcm (11)
- getbyte (33)
- 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 (165)
- hex (11)
- hour (11)
- index (44)
- initgroups (11)
- ino (11)
- inspect (11)
- integer? (22)
- ioctl (11)
- kill (11)
-
last
_ column (6) -
last
_ lineno (6) - lchmod (11)
- lchown (11)
- lcm (11)
- left (22)
- length (93)
- lgamma (11)
- lineno (44)
- lutime (7)
- magnitude (11)
- match (3)
- max (9)
- maxgroups (11)
- maxgroups= (11)
- mday (11)
- method (11)
- min (11)
- mode (11)
- modulo (11)
- mon (11)
- month (11)
-
named
_ captures (11) - new (29)
-
new
_ seed (11) - next (11)
- nlink (11)
- nobits? (7)
- nsec (11)
-
num
_ waiting (9) - numerator (44)
-
object
_ id (11) - oct (11)
- odd? (11)
- offset (22)
- one? (39)
- ord (22)
- owner (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)
- rand (88)
- rationalize (22)
- rdev (11)
-
rdev
_ major (11) -
rdev
_ minor (11) -
re
_ exchange (22) - readbyte (22)
- real? (11)
- remainder (11)
- rid (22)
- rindex (44)
- round (52)
-
safe
_ level (7) - sec (11)
- seed (11)
-
set
_ trace _ func (11) - setbyte (11)
- setsid (11)
- signo (11)
-
singleton
_ class (11) - size (182)
- size? (33)
- sleep (33)
-
sort
_ by (22) -
source
_ location (39) - spawn (55)
- sprintf (11)
- sqrt (18)
- srand (44)
- stat (22)
- state (22)
- status (11)
- step (84)
- stopsig (11)
- subsec (11)
- succ (11)
- sum (49)
- switch (44)
- syscall (11)
- sysopen (11)
- sysseek (11)
- syswrite (11)
- tally (6)
- tell (33)
- termsig (11)
- test (22)
- times (22)
-
to
_ f (22) -
to
_ i (110) -
to
_ int (33) -
to
_ r (11) -
to
_ s (11) - truncate (44)
-
try
_ convert (3) -
tv
_ nsec (11) -
tv
_ sec (11) -
tv
_ usec (11) - uid (22)
- umask (22)
- unlink (11)
- unpack (11)
- upto (22)
- usec (11)
-
utc
_ offset (11) - utime (11)
-
values
_ at (11) - wait (11)
- wait2 (11)
- waitall (11)
- waitpid (11)
- waitpid2 (11)
- wday (11)
-
world
_ readable? (33) -
world
_ writable? (11) - write (44)
-
write
_ nonblock (11) - yday (11)
- year (11)
- | (11)
- ~ (22)
検索結果
先頭5件
-
Integer (38014.0)
-
整数クラスです。
...。
整数オブジェクトに特異メソッドを追加する事はできません。追加した場合、
TypeError が発生します。
2.4.0 から Fixnum, Bignum は Integerに統合されました。
2.4.0 からはどちらも Integer クラスのエイリアスとなっています。......整数クラスです。
整数オブジェクトに特異メソッドを追加する事はできません。追加した場合、
TypeError が発生します。
かつて Integer クラスのエイリアスであった Fixnum と Bignum は 3.2 で削除されました。... -
Integer
# integer? -> true (27115.0) -
常に真を返します。
...常に真を返します。
//emlist[][ruby]{
1.integer? # => true
1.0.integer? # => false
//}... -
Integer
. try _ convert(obj) -> Integer | nil (21155.0) -
obj を Integer に変換しようと試みます。変換には Object#to_int メソッドが使われます。
...obj を Integer に変換しようと試みます。変換には Object#to_int
メソッドが使われます。
Integer ならそのままobjを返します。
そうでなければ obj.to_int の結果を返すか、nil が返されます。
@param obj 変換する任意のオブジェクト......@return Integer または nil
@raise TypeError to_int が Integer を返さなかった場合に発生します。
//emlist[例][ruby]{
Integer.try_convert(1) # => 1
Integer.try_convert(1.25) # => 1
Integer.try_convert([]) # => nil
//}... -
Integer
. sqrt(n) -> Integer (21151.0) -
非負整数 n の整数の平方根を返します。すなわち n の平方根以下の 最大の非負整数を返します。
...。Integer ではない場合は、最初に Integer に変換されます。
@raise Math::DomainError n が負の整数の時に発生します。
//emlist[][ruby]{
Integer.sqrt(0) # => 0
Integer.sqrt(1) # => 1
Integer.sqrt(24) # => 4
Integer.sqrt(25) # => 5
Integer.sqrt(.......floor と同等ですが、後者は浮動小数点数の精度の限界によって
真の値とは違う結果になることがあります。
//emlist[][ruby]{
Integer.sqrt(10**46) #=> 100000000000000000000000
Math.sqrt(10**46).floor #=> 99999999999999991611392 (!)
//}
@see Math.#sqrt... -
Integer
# div(other) -> Integer (21139.0) -
整商(整数の商)を返します。 普通の商(剰余を考えない商)を越えない最大の整数をもって整商とします。
...ます。
普通の商(剰余を考えない商)を越えない最大の整数をもって整商とします。
other が Integer オブジェクトの場合、Integer#/ の結果と一致します。
div に対応する剰余メソッドは modulo です。
@param other 二項演算の右側......=> 3
begin
2.div(0)
rescue => e
e # => #<ZeroDivisionError: divided by 0>
end
begin
2.div(0.0)
rescue => e
e # => #<ZeroDivisionError: divided by 0>
# Integer#/ と違い、引数が Float でもゼロで割ることはできない
end
//}
@see Integer#fdiv, Integer#/, Integer#modulo... -
Integer
# gcd(n) -> Integer (21115.0) -
自身と整数 n の最大公約数を返します。
...7) # => 1
((1<<31)-1).gcd((1<<61)-1) # => 1
//}
また、self や n が 0 だった場合は、0 ではない方の整数の絶対値を返します。
//emlist[][ruby]{
3.gcd(0) # => 3
0.gcd(-7) # => 7
//}
@see Integer#lcm, Integer#gcdlcm... -
Integer
# gcdlcm(n) -> [Integer] (21115.0) -
自身と整数 n の最大公約数と最小公倍数の配列 [self.gcd(n), self.lcm(n)] を返します。
...@raise ArgumentError n に整数以外のものを指定すると発生します。
//emlist[][ruby]{
2.gcdlcm(2) # => [2, 2]
3.gcdlcm(-7) # => [1, 21]
((1<<31)-1).gcdlcm((1<<61)-1) # => [1, 4951760154835678088235319297]
//}
@see Integer#gcd, Integer#lcm... -
Integer
# lcm(n) -> Integer (21115.0) -
自身と整数 n の最小公倍数を返します。
...3.lcm(-7) # => 21
((1<<31)-1).lcm((1<<61)-1) # => 4951760154835678088235319297
//}
また、self や n が 0 だった場合は、0 を返します。
//emlist[][ruby]{
3.lcm(0) # => 0
0.lcm(-7) # => 0
//}
@see Integer#gcd, Integer#gcdlcm... -
Integer
# upto(max) {|n| . . . } -> Integer (21115.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
# next -> Integer (21110.0) -
self の次の整数を返します。
...self の次の整数を返します。
//emlist[][ruby]{
1.next #=> 2
(-1).next #=> 0
1.succ #=> 2
(-1).succ #=> 0
//}
@see Integer#pred... -
Integer
# succ -> Integer (21110.0) -
self の次の整数を返します。
...self の次の整数を返します。
//emlist[][ruby]{
1.next #=> 2
(-1).next #=> 0
1.succ #=> 2
(-1).succ #=> 0
//}
@see Integer#pred...