3943件ヒット
[1-100件を表示]
(0.048秒)
クラス
-
ARGF
. class (96) - Array (293)
- BasicObject (12)
- Bignum (12)
- Binding (7)
- Complex (24)
- Data (3)
- Dir (35)
-
Encoding
:: Converter (48) - Enumerator (12)
-
Enumerator
:: ArithmeticSequence (14) -
Enumerator
:: Chain (7) - File (12)
-
File
:: Stat (204) - Fixnum (9)
- Float (105)
- Hash (36)
- IO (185)
- Integer (830)
- MatchData (90)
- Method (36)
- Module (24)
- Mutex (2)
- NilClass (12)
- Numeric (249)
- Object (84)
- Proc (36)
-
Process
:: Status (84) - Random (72)
- Range (28)
- Rational (96)
- Regexp (60)
-
RubyVM
:: AbstractSyntaxTree :: Node (28) -
RubyVM
:: InstructionSequence (12) - Set (9)
- SignalException (12)
- String (309)
- Struct (72)
- Symbol (39)
- SystemCallError (12)
- SystemExit (12)
- Thread (55)
-
Thread
:: Backtrace :: Location (12) -
Thread
:: Mutex (10) -
Thread
:: Queue (30) -
Thread
:: SizedQueue (26) - Time (252)
- TracePoint (12)
- UnboundMethod (48)
モジュール
- Enumerable (176)
キーワード
- % (24)
- & (24)
- * (12)
- ** (12)
- + (12)
- - (12)
- -@ (30)
-
/ (23) - < (12)
- << (30)
- <= (12)
- <=> (36)
- == (12)
- === (12)
- =~ (36)
- > (12)
- >= (12)
- >> (24)
- [] (36)
- []= (12)
- ^ (12)
-
_ _ id _ _ (12) - abs (12)
-
add
_ trace _ func (12) - allbits? (8)
- any? (48)
- anybits? (8)
- arity (36)
- begin (12)
-
bit
_ length (18) - blksize (12)
- blocks (12)
-
bsearch
_ index (20) - byteindex (3)
- byteoffset (6)
- byterindex (3)
- bytes (24)
- bytesize (12)
- ceil (48)
- ceildiv (3)
- chr (36)
- class (12)
- classify (3)
- codepoints (24)
- coerce (12)
- concat (18)
-
const
_ source _ location (12) - count (84)
- day (12)
- denominator (60)
-
dev
_ major (12) -
dev
_ minor (12) - dig (9)
- digits (24)
- div (24)
- divmod (18)
- downto (24)
- end (12)
- errno (12)
- even? (12)
- exitstatus (12)
- fcntl (12)
- fdiv (12)
- fileno (35)
-
find
_ index (72) -
first
_ column (7) -
first
_ lineno (19) - floor (48)
- gcd (12)
- gcdlcm (12)
- getbyte (36)
- gid (12)
-
gmt
_ offset (12) - gmtoff (12)
- hash (181)
- hex (12)
- hour (12)
- index (48)
- ino (12)
- inspect (12)
- integer? (24)
- ioctl (12)
-
last
_ column (7) -
last
_ lineno (7) - lcm (12)
- left (12)
- length (93)
- lineno (48)
- magnitude (12)
- match (3)
- max (10)
- mday (12)
- method (12)
- min (12)
- mode (12)
- modulo (12)
- mon (12)
- month (12)
-
named
_ captures (12) - next (12)
- nlink (12)
- nobits? (8)
- nsec (12)
-
num
_ waiting (10) - numerator (48)
-
object
_ id (12) - oct (12)
- odd? (12)
- offset (24)
- one? (45)
- ord (24)
- owner (12)
- pack (21)
- pid (24)
- pos (36)
- pow (24)
- pred (12)
-
primitive
_ convert (48) - priority (12)
- priority= (12)
-
public
_ method (12) - pwrite (8)
- rand (36)
- rationalize (24)
- rdev (12)
-
rdev
_ major (12) -
rdev
_ minor (12) - readbyte (24)
- real? (12)
- remainder (12)
-
reverse
_ each (4) - rindex (48)
- round (57)
-
safe
_ level (7) - sec (12)
- seed (12)
-
set
_ trace _ func (12) - setbyte (12)
- signo (12)
-
singleton
_ class (12) - size (167)
- size? (12)
- sleep (12)
-
sort
_ by (24) -
source
_ location (43) - state (12)
- status (12)
- step (93)
- stopsig (12)
- subsec (12)
- succ (12)
- sum (54)
- sysseek (12)
- syswrite (12)
- tally (8)
- tell (36)
- termsig (12)
- times (24)
-
to
_ f (24) -
to
_ i (120) -
to
_ int (36) -
to
_ r (12) -
to
_ s (12) - truncate (48)
-
tv
_ nsec (12) -
tv
_ sec (12) -
tv
_ usec (12) - uid (12)
- unpack (12)
- upto (24)
- usec (12)
-
utc
_ offset (12) -
values
_ at (12) - wday (12)
-
world
_ readable? (12) -
world
_ writable? (12) - write (24)
-
write
_ nonblock (12) - yday (12)
- year (12)
- | (12)
- ~ (24)
検索結果
先頭5件
-
Integer
# integer? -> true (15116.0) -
常に真を返します。
...常に真を返します。
//emlist[][ruby]{
1.integer? # => true
1.0.integer? # => false
//}... -
Integer
# div(other) -> Integer (9140.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 (9116.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] (9116.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 (9116.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 (9116.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 (9111.0) -
self の次の整数を返します。
...self の次の整数を返します。
//emlist[][ruby]{
1.next #=> 2
(-1).next #=> 0
1.succ #=> 2
(-1).succ #=> 0
//}
@see Integer#pred... -
Integer
# succ -> Integer (9111.0) -
self の次の整数を返します。
...self の次の整数を返します。
//emlist[][ruby]{
1.next #=> 2
(-1).next #=> 0
1.succ #=> 2
(-1).succ #=> 0
//}
@see Integer#pred... -
Integer
# bit _ length -> Integer (9110.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...