種類
ライブラリ
- English (24)
- ビルトイン (2012)
- bigdecimal (50)
- csv (36)
- digest (48)
- drb (12)
- etc (24)
- fiddle (24)
- ipaddr (12)
-
irb
/ ext / history (12) -
irb
/ ext / save-history (12) - logger (12)
- matrix (132)
- mkmf (72)
-
net
/ ftp (20) -
net
/ http (132) -
net
/ imap (24) -
net
/ pop (12) - objspace (12)
- openssl (120)
- optparse (156)
- prime (36)
- pty (48)
-
rexml
/ document (12) - ripper (24)
-
ripper
/ filter (24) -
ripper
/ lexer (8) - scanf (12)
- securerandom (12)
- set (9)
- shell (48)
-
shell
/ command-processor (24) -
shell
/ filter (24) - socket (68)
- stringio (12)
- strscan (72)
- syslog (60)
- thread (4)
- uri (24)
-
webrick
/ httpresponse (24) - win32ole (96)
- zlib (96)
クラス
-
ARGF
. class (12) - Array (257)
- BasicSocket (24)
- BigDecimal (36)
- CSV (12)
-
CSV
:: FieldInfo (24) -
DRb
:: DRbObject (12) -
Digest
:: Base (48) - Dir (35)
- Enumerator (31)
-
Enumerator
:: ArithmeticSequence (7) -
Enumerator
:: Chain (7) -
Fiddle
:: Function (24) - File (36)
-
File
:: Stat (48) - Float (57)
- IO (152)
- IPAddr (12)
-
IRB
:: Context (24) - Integer (164)
- Logger (12)
- MatchData (54)
- Matrix (132)
- Method (12)
- Module (12)
-
Net
:: FTP :: MLSxEntry (20) -
Net
:: HTTP (108) -
Net
:: IMAP (12) -
Net
:: IMAP :: ThreadMember (12) -
Net
:: POP3 (12) - Numeric (94)
-
OpenSSL
:: ASN1 :: BitString (12) -
OpenSSL
:: OCSP :: BasicResponse (12) -
OpenSSL
:: SSL :: SSLContext (60) -
OpenSSL
:: SSL :: SSLSocket (12) -
OpenSSL
:: X509 :: Store (12) - OptionParser (156)
-
Prime
:: PseudoPrimeGenerator (12) - Proc (24)
-
Process
:: Status (36) -
RDoc
:: Options (12) -
REXML
:: Parent (12) - Random (72)
- Range (16)
- Rational (60)
- Regexp (60)
- Ripper (32)
-
Ripper
:: Filter (24) - Set (12)
- Shell (48)
-
Shell
:: CommandProcessor (24) -
Shell
:: Filter (24) -
Socket
:: Ifaddr (8) - String (150)
- StringIO (12)
- StringScanner (72)
- Symbol (15)
- SystemCallError (12)
- TCPServer (12)
- Thread (24)
-
Thread
:: Queue (24) - Time (12)
- TracePoint (12)
- UNIXServer (12)
- UNIXSocket (12)
-
URI
:: Generic (24) - UnboundMethod (24)
-
WEBrick
:: HTTPResponse (24) -
WIN32OLE
_ METHOD (36) -
WIN32OLE
_ TYPE (12) -
WIN32OLE
_ VARIABLE (24) -
WIN32OLE
_ VARIANT (24) -
Zlib
:: GzipReader (60) -
Zlib
:: GzipWriter (36)
モジュール
- Enumerable (168)
- Etc (12)
- FileTest (24)
- Kernel (244)
- Math (12)
-
Net
:: HTTPHeader (24) - ObjectSpace (60)
- PTY (48)
- Process (144)
- SecureRandom (12)
- Syslog (60)
キーワード
-
$ INPUT _ LINE _ NUMBER (12) -
$ NR (12) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (12)
- <=> (48)
- =~ (36)
- ASN1 (12)
- BigDecimal (14)
-
CLOCK
_ MONOTONIC (12) -
CLOCK
_ PROCESS _ CPUTIME _ ID (12) -
CLOCK
_ REALTIME (12) - Integer (7)
- Marshal フォーマット (12)
-
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - Numeric (12)
- Rational (7)
- Ruby用語集 (12)
- [] (42)
-
_ _ drbref (12) -
add
_ trace _ func (12) - any? (48)
- arity (12)
- begin (12)
- bigdecimal (12)
- binwrite (12)
-
block
_ length (12) -
bsearch
_ index (20) - byteindex (3)
- byteoffset (6)
- byterindex (3)
- bytes (24)
- call (12)
- ceil (25)
-
check
_ signedness (24) -
check
_ sizeof (24) - chr (12)
- classify (12)
-
clock
_ gettime (12) - codepoints (24)
- cofactor (12)
-
cofactor
_ expansion (12) - column (24)
- compile (12)
-
content
_ length (24) -
content
_ length= (12) -
continue
_ timeout (12) - count (72)
-
coverage
_ report (12) - debug (12)
- debug? (12)
-
default
_ port (24) - dig (9)
-
digest
_ length (12) - downto (24)
-
each
_ object (48) -
each
_ prime (24) - end (12)
- errno (12)
- error (12)
-
eval
_ history (12) - exist? (12)
- exitstatus (12)
- expunge (12)
- facility (12)
- facts (10)
- fcntl (12)
- fileno (11)
-
find
_ index (108) - floor (26)
- fork (48)
- getbyte (48)
- getc (12)
- getpeereid (12)
- getpty (24)
- getrlimit (12)
- helpcontext (24)
- ident (12)
- index (108)
-
laplace
_ expansion (12) - length (24)
- lex (8)
- line (12)
- lineno (48)
-
local
_ port (12) - mask (12)
- mask= (12)
- match (3)
- match? (12)
-
matched
_ size (12) - matchedsize (12)
-
memsize
_ of _ all (12) - mode (24)
- new (43)
- offset (24)
-
ole
_ type _ detail (12) - on (144)
- one? (45)
-
open
_ timeout (12) - owner (12)
- pack (21)
- pack テンプレート文字列 (12)
- pathconf (12)
- pending (12)
- pid (24)
- pos (48)
- prime (12)
-
proxy
_ port (24) - proxyport (12)
- ptr (12)
- pwrite (8)
- rand (96)
-
random
_ number (12) -
range
_ length (12) -
read
_ timeout (12) - readbyte (12)
- readchar (12)
-
recv
_ io (12) - recvmsg (12)
-
reverse
_ each (4) - rindex (48)
- round (37)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
save
_ history (12) - scanf (12)
- seqno (12)
-
set
_ trace _ func (12) - sign (12)
- size (102)
- size? (54)
-
size
_ opt _ params (12) -
size
_ params (12) - skip (12)
-
skip
_ until (12) -
sort
_ by (24) -
source
_ location (36) - spawn (72)
- sqrt (12)
-
ssl
_ timeout (24) - status (12)
- step (93)
- stopsig (12)
- subsec (12)
- sum (54)
-
summary
_ width (12) - sysaccept (24)
- sysconf (12)
- sysseek (12)
- syswrite (12)
- tell (48)
- termsig (12)
- test (42)
- timeout (12)
- times (24)
-
to
_ i (21) - tr (12)
- trace (12)
- truncate (25)
-
try
_ constant (24) -
try
_ convert (4) - unpack (12)
-
unused
_ bits (12) -
upper
_ bound (12) - upto (24)
- varkind (12)
- vartype (12)
- verify (12)
-
verify
_ depth (12) -
verify
_ mode (24) - vhid (8)
- wait (12)
- wait2 (12)
- waitall (12)
- waitpid (12)
- waitpid2 (12)
-
world
_ readable? (36) -
world
_ writable? (12) - write (24)
-
write
_ nonblock (12) - ~ (12)
- このマニュアルのヘルプ (12)
- パターンマッチ (12)
- 制御構造 (12)
検索結果
先頭5件
-
Integer
# |(other) -> Integer (27213.0) -
ビット二項演算子。論理和を計算します。
...ビット二項演算子。論理和を計算します。
@param other 数値
//emlist[][ruby]{
1 | 1 # => 1
2 | 3 # => 3
//}... -
Integer
# <=>(other) -> -1 | 0 | 1 | nil (9303.0) -
self と other を比較して、self が大きい時に1、等しい時に 0、小さい時 に-1、比較できない時に nil を返します。
self と other を比較して、self が大きい時に1、等しい時に 0、小さい時
に-1、比較できない時に nil を返します。
@param other 比較対象の数値
@return -1 か 0 か 1 か nil のいずれか
//emlist[][ruby]{
1 <=> 2 # => -1
1 <=> 1 # => 0
2 <=> 1 # => 1
2 <=> '' # => nil
//} -
Integer
. try _ convert(obj) -> Integer | nil (9254.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
# upto(max) {|n| . . . } -> Integer (9220.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
# ceil(ndigits = 0) -> Integer | Float (9208.0) -
self と等しいかより大きな整数のうち最小のものを返します。
...合、Float を返します。
小数点以下を、最大 n 桁にします。
負の整数を指定した場合、Integer を返します。
小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[][ruby]{
1.ceil # =... -
Integer
# floor(ndigits = 0) -> Integer | Float (9208.0) -
self と等しいかより小さな整数のうち最大のものを返します。
...合、Float を返します。
小数点以下を、最大 n 桁にします。
負の整数を指定した場合、Integer を返します。
小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[][ruby]{
1.floor #... -
Integer
# round(ndigits = 0 , half: :up) -> Integer | Float (9208.0) -
self ともっとも近い整数を返します。
...合、Float を返します。
小数点以下を、最大 n 桁にします。
負の整数を指定した場合、Integer を返します。
小数点位置から左に少なくとも n 個の 0 が並びます。
@param half ちょうど半分の値の... -
Integer
# truncate(ndigits = 0) -> Integer | Float (9208.0) -
0 から self までの整数で、自身にもっとも近い整数を返します。
...合、Float を返します。
小数点以下を、最大 n 桁にします。
負の整数を指定した場合、Integer を返します。
小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[][ruby]{
1.truncate... -
Integer
# downto(min) {|n| . . . } -> self (9119.0) -
self から min まで 1 ずつ減らしながらブロックを繰り返し実行します。 self < min であれば何もしません。
...で 1 ずつ減らしながらブロックを繰り返し実行します。
self < min であれば何もしません。
@param min 数値
@return self を返します。
//emlist[][ruby]{
5.downto(1) {|i| print i, " " } # => 5 4 3 2 1
//}
@see Integer#upto, Numeric#step, Integer#times... -
Integer
# times {|n| . . . } -> self (9119.0) -
self 回だけ繰り返します。 self が正の整数でない場合は何もしません。
...れます。
//emlist[][ruby]{
3.times { puts "Hello, World!" } # Hello, World! と3行続いて表示される。
0.times { puts "Hello, World!" } # 何も表示されない。
5.times {|n| print n } # 01234 と表示される。
//}
@see Integer#upto, Integer#downto, Numeric#step... -
Integer
# [](nth) -> Integer (9115.0) -
nth 番目のビット(最下位ビット(LSB)が 0 番目)が立っている時 1 を、そうでなければ 0 を返します。
...elf[...j] で n & ((1 << j) - 1) が 0 以外のとき
//emlist[][ruby]{
a = 0b11001100101010
30.downto(0) {|n| print a[n] }
# => 0000000000000000011001100101010
a = 9**15
50.downto(0) {|n| print a[n] }
# => 000101110110100000111000011110010100111100010111001
//}
n[i] は (n >> i) & 1 と等価... -
Integer
# [](nth , len) -> Integer (9115.0) -
nth 番目のビット(最下位ビット(LSB)が 0 番目)が立っている時 1 を、そうでなければ 0 を返します。
...elf[...j] で n & ((1 << j) - 1) が 0 以外のとき
//emlist[][ruby]{
a = 0b11001100101010
30.downto(0) {|n| print a[n] }
# => 0000000000000000011001100101010
a = 9**15
50.downto(0) {|n| print a[n] }
# => 000101110110100000111000011110010100111100010111001
//}
n[i] は (n >> i) & 1 と等価... -
Integer
# [](range) -> Integer (9115.0) -
nth 番目のビット(最下位ビット(LSB)が 0 番目)が立っている時 1 を、そうでなければ 0 を返します。
...elf[...j] で n & ((1 << j) - 1) が 0 以外のとき
//emlist[][ruby]{
a = 0b11001100101010
30.downto(0) {|n| print a[n] }
# => 0000000000000000011001100101010
a = 9**15
50.downto(0) {|n| print a[n] }
# => 000101110110100000111000011110010100111100010111001
//}
n[i] は (n >> i) & 1 と等価... -
Integer
# [](nth) -> Integer (9113.0) -
nth 番目のビット(最下位ビット(LSB)が 0 番目)が立っている時 1 を、そうでなければ 0 を返します。
...ビット目を指すかの数値
@return 1 か 0
//emlist[][ruby]{
a = 0b11001100101010
30.downto(0) {|n| print a[n] }
# => 0000000000000000011001100101010
a = 9**15
50.downto(0) {|n| print a[n] }
# => 000101110110100000111000011110010100111100010111001
//}
n[i] は (n >> i) & 1 と等価な...