3567件ヒット
[1-100件を表示]
(0.336秒)
ライブラリ
- ビルトイン (3567)
クラス
-
ARGF
. class (88) - Array (265)
- BasicObject (11)
- Bignum (12)
- Binding (6)
- Complex (22)
- Data (2)
- Dir (32)
-
Encoding
:: Converter (44) - Enumerator (11)
-
Enumerator
:: ArithmeticSequence (12) -
Enumerator
:: Chain (6) - File (11)
-
File
:: Stat (187) - Fixnum (9)
- Float (96)
- Hash (33)
- IO (169)
- Integer (758)
- MatchData (81)
- Method (33)
- Module (16)
- Mutex (2)
- NilClass (11)
- Numeric (216)
- Object (77)
- Proc (33)
-
Process
:: Status (77) - Random (66)
- Range (22)
- Rational (88)
- Regexp (55)
-
RubyVM
:: AbstractSyntaxTree :: Node (24) -
RubyVM
:: InstructionSequence (11) - SignalException (11)
- String (281)
- Struct (66)
- Symbol (36)
- SystemCallError (11)
- SystemExit (11)
- Thread (51)
-
Thread
:: Backtrace :: Location (11) -
Thread
:: Mutex (9) -
Thread
:: Queue (27) -
Thread
:: SizedQueue (23) - Time (231)
- TracePoint (11)
- UnboundMethod (44)
モジュール
- Enumerable (158)
キーワード
- % (22)
- & (22)
- * (11)
- ** (11)
- + (11)
- - (11)
- -@ (28)
-
/ (10) - < (11)
- << (27)
- <= (11)
- <=> (33)
- == (11)
- === (11)
- =~ (33)
- > (11)
- >= (11)
- >> (22)
- [] (32)
- []= (11)
- ^ (11)
-
_ _ id _ _ (11) - abs (11)
-
add
_ trace _ func (11) - allbits? (7)
- any? (42)
- anybits? (7)
- arity (33)
- begin (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)
- chr (33)
- class (11)
- codepoints (22)
- coerce (11)
- concat (16)
-
const
_ source _ location (5) - count (77)
- day (11)
- denominator (55)
-
dev
_ major (11) -
dev
_ minor (11) - dig (8)
- digits (22)
- div (22)
- divmod (17)
- downto (22)
- end (11)
- errno (11)
- even? (11)
- exitstatus (11)
- fcntl (11)
- fdiv (11)
- fileno (32)
-
find
_ index (66) -
first
_ column (6) -
first
_ lineno (17) - floor (44)
- gcd (11)
- gcdlcm (11)
- getbyte (33)
- gid (11)
-
gmt
_ offset (11) - gmtoff (11)
- hash (165)
- hex (11)
- hour (11)
- index (44)
- ino (11)
- inspect (11)
- integer? (22)
- ioctl (11)
-
last
_ column (6) -
last
_ lineno (6) - lcm (11)
- left (11)
- length (82)
- lineno (44)
- magnitude (11)
- match (3)
- max (9)
- mday (11)
- method (11)
- min (11)
- mode (11)
- modulo (11)
- mon (11)
- month (11)
-
named
_ captures (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 (22)
- pos (33)
- pow (22)
- pred (11)
-
primitive
_ convert (44) - priority (11)
- priority= (11)
-
public
_ method (11) - pwrite (7)
- rand (33)
- rationalize (22)
- rdev (11)
-
rdev
_ major (11) -
rdev
_ minor (11) - readbyte (22)
- real? (11)
- remainder (11)
- rindex (44)
- round (52)
-
safe
_ level (7) - sec (11)
- seed (11)
-
set
_ trace _ func (11) - setbyte (11)
- signo (11)
-
singleton
_ class (11) - size (149)
- size? (11)
- sleep (11)
-
sort
_ by (22) -
source
_ location (39) - state (11)
- status (11)
- step (84)
- stopsig (11)
- subsec (11)
- succ (11)
- sum (49)
- sysseek (11)
- syswrite (11)
- tally (6)
- tell (33)
- termsig (11)
- times (22)
-
to
_ f (22) -
to
_ i (110) -
to
_ int (33) -
to
_ r (11) -
to
_ s (11) - truncate (44)
-
tv
_ nsec (11) -
tv
_ sec (11) -
tv
_ usec (11) - uid (11)
- unpack (11)
- upto (22)
- usec (11)
-
utc
_ offset (11) -
values
_ at (11) - wday (11)
-
world
_ readable? (11) -
world
_ writable? (11) - write (22)
-
write
_ nonblock (11) - yday (11)
- year (11)
- | (11)
- ~ (22)
検索結果
先頭5件
-
Integer
# integer? -> true (23114.0) -
常に真を返します。
...常に真を返します。
//emlist[][ruby]{
1.integer? # => true
1.0.integer? # => false
//}... -
Integer
# div(other) -> Integer (17138.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 (17114.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] (17114.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 (17114.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 (17114.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 (17109.0) -
self の次の整数を返します。
...self の次の整数を返します。
//emlist[][ruby]{
1.next #=> 2
(-1).next #=> 0
1.succ #=> 2
(-1).succ #=> 0
//}
@see Integer#pred... -
Integer
# succ -> Integer (17109.0) -
self の次の整数を返します。
...self の次の整数を返します。
//emlist[][ruby]{
1.next #=> 2
(-1).next #=> 0
1.succ #=> 2
(-1).succ #=> 0
//}
@see Integer#pred... -
Integer
# bit _ length -> Integer (17108.0) -
self を表すのに必要なビット数を返します。
...# => 1
-1.bit_length # => 0
0.bit_length # => 0
1.bit_length # => 1
0xff.bit_length # => 8
0x100.bit_length # => 9
(2**12-1).bit_length # => 12
(2**12).bit_length # => 13
(2**12+1).bit_length # => 13
//}
@see Integer#size... -
Integer
# ceil(ndigits = 0) -> Integer | Float (17108.0) -
self と等しいかより大きな整数のうち最小のものを返します。
...合、Float を返します。
小数点以下を、最大 n 桁にします。
負の整数を指定した場合、Integer を返します。
小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[][ruby]{
1.ceil # =...