ライブラリ
- ビルトイン (1297)
- bigdecimal (45)
- csv (33)
- drb (11)
- etc (22)
- fiddle (11)
- ipaddr (11)
-
irb
/ context (11) -
irb
/ ext / history (22) -
irb
/ ext / save-history (22) - json (11)
- logger (11)
- matrix (88)
- mkmf (88)
-
net
/ ftp (9) -
net
/ http (121) -
net
/ imap (44) -
net
/ pop (11) - objspace (22)
- openssl (132)
- pathname (22)
- prime (33)
- pty (44)
- resolv-replace (11)
-
rexml
/ document (11) -
rinda
/ rinda (11) - ripper (22)
-
ripper
/ filter (22) -
ripper
/ lexer (11) - scanf (12)
- shell (30)
-
shell
/ command-processor (30) -
shell
/ filter (30) - socket (84)
- stringio (11)
- strscan (88)
- syslog (55)
- thread (4)
- uri (22)
-
webrick
/ httpresponse (22) -
win32
/ registry (22) - win32ole (77)
- zlib (63)
クラス
-
ARGF
. class (11) - Array (205)
- BasicSocket (55)
- BigDecimal (33)
- CSV (22)
-
CSV
:: FieldInfo (11) -
DRb
:: DRbObject (11) -
Encoding
:: Converter (44) - Enumerator (29)
-
Enumerator
:: ArithmeticSequence (6) -
Enumerator
:: Chain (6) -
Fiddle
:: Function (11) - File (44)
-
File
:: Stat (110) - Float (16)
- IO (110)
- IPAddr (11)
-
IRB
:: Context (44) - Integer (47)
- Logger (11)
- MatchData (48)
- Matrix (88)
- Method (11)
- Module (16)
- Mutex (2)
-
Net
:: FTP :: MLSxEntry (9) -
Net
:: HTTP (99) -
Net
:: IMAP (33) -
Net
:: IMAP :: ThreadMember (11) -
Net
:: POP3 (11) - NilClass (11)
- Numeric (54)
- Object (22)
-
OpenSSL
:: ASN1 :: BitString (11) -
OpenSSL
:: OCSP :: BasicResponse (11) -
OpenSSL
:: SSL :: SSLContext (55) -
OpenSSL
:: SSL :: SSLSocket (22) -
OpenSSL
:: X509 :: Store (11) - Pathname (22)
-
Prime
:: PseudoPrimeGenerator (11) - Proc (11)
-
Process
:: Status (33) -
REXML
:: Parent (11) - Range (11)
- Regexp (44)
- Ripper (33)
-
Ripper
:: Filter (22) - Shell (30)
-
Shell
:: CommandProcessor (30) -
Shell
:: Filter (30) - Socket (11)
-
Socket
:: Ifaddr (7) - String (71)
- StringIO (11)
- StringScanner (88)
- Symbol (14)
- SystemCallError (11)
- Thread (22)
-
Thread
:: Mutex (9) -
Thread
:: Queue (22) - UDPSocket (11)
- UNIXSocket (11)
-
URI
:: Generic (22) - UnboundMethod (11)
-
WEBrick
:: HTTPResponse (22) - WIN32OLE (11)
-
WIN32OLE
_ METHOD (33) -
WIN32OLE
_ TYPE (11) -
WIN32OLE
_ TYPELIB (11) -
WIN32OLE
_ VARIANT (11) -
Win32
:: Registry (22) -
Zlib
:: GzipReader (33)
モジュール
- Enumerable (75)
- Etc (11)
- FileTest (22)
-
JSON
:: Generator :: GeneratorMethods :: Integer (11) - Kernel (232)
-
Net
:: HTTPHeader (22) - ObjectSpace (22)
-
OpenSSL
:: ASN1 (11) - PTY (44)
- Process (66)
- Syslog (55)
- Zlib (30)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - << (11)
- <=> (44)
- =~ (33)
- ASN1 (11)
- BigDecimal (12)
- Context (11)
- Marshal フォーマット (11)
-
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - Rational (11)
- Ruby用語集 (11)
- Template (11)
- [] (29)
-
_ _ drbref (11) -
add
_ trace _ func (11) - adler32 (15)
-
allocation
_ sourceline (11) - any? (42)
- begin (11)
- binwrite (22)
- blksize (11)
- blocks (11)
-
bsearch
_ index (18) - byteindex (2)
- byteoffset (4)
- byterindex (2)
- call (11)
-
check
_ signedness (22) -
check
_ sizeof (22) - chown (29)
- cipher (11)
- codepage (11)
-
cofactor
_ expansion (11) - column (22)
- compile (11)
-
const
_ source _ location (5) -
content
_ length (22) -
content
_ length= (11) -
continue
_ timeout (11) -
convertible
_ int (22) -
copy
_ stream (22) - crc32 (15)
- decode (11)
-
default
_ port (22) -
dev
_ major (11) -
dev
_ minor (11) - dig (8)
-
each
_ prime (22) - end (11)
- errno (11)
- error (11)
-
eval
_ history (11) -
eval
_ history= (11) - exist? (11)
- exitstatus (11)
- expunge (11)
- facility (11)
- fcntl (11)
-
field
_ size _ limit (11) -
find
_ index (99) - fork (44)
- getaddrinfo (11)
- getbyte (44)
- getc (11)
- getpty (22)
- hash (11)
- helpcontext (22)
- ident (11)
- index (88)
- ioctl (11)
-
laplace
_ expansion (11) - lchown (11)
- length (22)
- lex (11)
- limit (11)
- line (11)
- lineno (33)
-
local
_ port (11) - mask (11)
- mask= (11)
- match (3)
- match? (11)
-
matched
_ size (11) - matchedsize (11)
-
memsize
_ of _ all (11) - mode (22)
- new (51)
- offset (22)
- one? (39)
-
open
_ timeout (11) - pack (19)
- pack テンプレート文字列 (11)
- pathconf (11)
- pending (11)
- pid (22)
- pointer (11)
- pos (11)
-
primitive
_ convert (44) -
proxy
_ port (22) - proxyport (11)
- rand (22)
-
range
_ length (11) -
rdev
_ major (11) -
rdev
_ minor (11) - read (11)
-
read
_ timeout (11) - readchar (11)
-
recv
_ io (11) - recvmsg (11)
-
recvmsg
_ nonblock (11) - rindex (44)
- round (27)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) -
save
_ history (11) -
save
_ history= (11) - scanf (12)
- search (11)
- send (22)
- sendmsg (11)
-
sendmsg
_ nonblock (11) - seqno (11)
-
set
_ trace _ func (11) -
singleton
_ class (11) - size (83)
- size? (51)
-
size
_ opt _ params (11) -
size
_ params (11) - skip (11)
-
skip
_ until (11) - sleep (11)
-
source
_ location (33) - spawn (66)
-
ssl
_ timeout (22) - status (11)
- step (54)
- stopsig (11)
- sysconf (11)
- termsig (11)
- test (40)
- timeout (11)
-
to
_ i (11) -
to
_ json (11) -
try
_ constant (22) -
try
_ convert (3) -
uid
_ search (11) - unpack (11)
-
unused
_ bits (11) -
upper
_ bound (11) - verify (11)
-
verify
_ depth (11) -
verify
_ mode (22) - vhid (7)
- wait (11)
- wait2 (11)
- waitpid (11)
- waitpid2 (11)
-
world
_ readable? (33) -
world
_ writable? (11) - write (33)
- ~ (11)
- このマニュアルのヘルプ (11)
- セキュリティモデル (8)
検索結果
先頭5件
-
Integer
. try _ convert(obj) -> Integer | nil (21272.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
# <=>(other) -> -1 | 0 | 1 | nil (21129.0) -
self と other を比較して、self が大きい時に1、等しい時に 0、小さい時 に-1、比較できない時に nil を返します。
...、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
# round(ndigits = 0 , half: :up) -> Integer | Float (21113.0) -
self ともっとも近い整数を返します。
...定した場合、Integer を返します。
小数点位置から左に少なくとも n 個の 0 が並びます。
@param half ちょうど半分の値の丸め方を指定します。
サポートされている値は以下の通りです。
* :up or nil: 0から遠い方... -
Integer
# round(ndigits = 0 , half: :up) -> Integer (21107.0) -
self ともっとも近い整数を返します。
...@param half ちょうど半分の値の丸め方を指定します。
サポートされている値は以下の通りです。
* :up or nil: 0から遠い方に丸められます。
* :even: もっとも近い偶数に丸められます。
* :down: 0に近い方に丸められます。... -
Integer
. each _ prime(upper _ bound) -> Enumerator (21006.0) -
全ての素数を列挙し、それぞれの素数をブロックに渡して評価します。
...素数をブロックに渡して評価します。
@param upper_bound 任意の正の整数を指定します。列挙の上界です。
nil が与えられた場合は無限に列挙し続けます。
@return ブロックの最後に評価された値を返します。... -
Integer
. each _ prime(upper _ bound) {|prime| . . . } -> object (21006.0) -
全ての素数を列挙し、それぞれの素数をブロックに渡して評価します。
...素数をブロックに渡して評価します。
@param upper_bound 任意の正の整数を指定します。列挙の上界です。
nil が与えられた場合は無限に列挙し続けます。
@return ブロックの最後に評価された値を返します。... -
Kernel
. # Integer(arg , base = 0 , exception: true) -> Integer | nil (18483.0) -
引数を整数(Fixnum,Bignum)に変換した結果を返します。
...る代わりに nil を返します。
@raise ArgumentError 整数と見なせない文字列を引数に指定した場合に発生します。
@raise TypeError メソッド to_int, to_i を持たないオブジェクトを引数に指定したか、to_int, to_i
が整数(Integerのサブクラ......引数に nil を指定した場合に発生します。
//emlist[例][ruby]{
p Integer(4) #=> 4
p Integer(4_000) #=> 4000
p Integer(9.88) #=> 9
p Integer(nil) # can't convert nil into Integer (TypeError)
p Integer(Object.new) # cannot convert Object into Integer (TypeEr......#=> 10
p Integer("10", 2) #=> 2
p Integer("0d10") #=> 10
p Integer("010") #=> 8
p Integer("0o10") #=> 8
p Integer("0x10") #=> 16
p Integer("0b10") #=> 2
p Integer(" \n10\t ") #=> 10 # 先頭と末尾の空白類は無視される
p Integer("1\n0") # `Integer': invalid... -
Kernel
. # Integer(arg , base = 0) -> Integer (18376.0) -
引数を整数(Fixnum,Bignum)に変換した結果を返します。
...Integerのサブクラス)を返さなかった場合に発生します。
@raise TypeError 引数に nil を指定した場合に発生します。
//emlist[例][ruby]{
p Integer(4) #=> 4
p Integer(4_000) #=> 4000
p Integer(9.88) #=> 9
p Integer(nil) # can't convert nil......into Integer (TypeError)
p Integer(Object.new) # cannot convert Object into Integer (TypeError)
p Integer("10") #=> 10
p Integer("10", 2) #=> 2
p Integer("0d10") #=> 10
p Integer("010") #=> 8
p Integer("0o10") #=> 8
p Integer("0x10") #=> 16
p Integer("0b10") #=> 2
p I......尾の空白類は無視される
p Integer("1\n0") # `Integer': invalid value for Integer: "1\n0" (ArgumentError)
p Integer("hoge") # `Integer': invalid value for Integer: "hoge" (ArgumentError)
p Integer("") # `Integer': invalid value for Integer: "" (ArgumentError)
//}
@see Strin... -
NilClass
# to _ i -> Integer (3107.0) -
0 を返します。
...0 を返します。
//emlist[例][ruby]{
nil.to_i #=> 0
//}... -
JSON
:: Generator :: GeneratorMethods :: Integer # to _ json(state _ or _ hash = nil) -> String (3101.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
10.to_json # => "10"
//} -
MatchData
# byteoffset(name) -> [Integer , Integer] | [nil , nil] (434.0) -
name という名前付きグループに対応する部分文字列のバイト単位のオフセットの 配列 [start, end] を返します。
...位のオフセットの
配列 [start, end] を返します。
nameの名前付きグループにマッチした部分文字列がなければ
[nil, nil] を返します。
@param name 名前(シンボルか文字列)
@raise IndexError 正規表現中で定義されていない name を指定し......') # => [0, 4]
p $~.byteoffset(:year) # => [0, 4]
p $~.byteoffset('month') # => [7, 8]
p $~.byteoffset(:month) # => [7, 8]
p $~.byteoffset('day') # => [nil, nil]
p $~.byteoffset('century') # => `offset': undefined group name reference: century (IndexError)
//}
@see MatchData#offset... -
MatchData
# offset(name) -> [Integer , Integer] | [nil , nil] (434.0) -
name という名前付きグループに対応する部分文字列のオフセットの配列 [start, end] を返 します。
...by]{
[ self.begin(name), self.end(name) ]
//}
と同じです。nameの名前付きグループにマッチした部分文字列がなければ
[nil, nil] を返します。
@param name 名前(シンボルか文字列)
@raise IndexError 正規表現中で定義されていない name を指定し......('year') # => [0, 4]
p $~.offset(:year) # => [0, 4]
p $~.offset('month') # => [5, 6]
p $~.offset(:month) # => [5, 6]
p $~.offset('day') # => [nil, nil]
p $~.offset('century') # => `offset': undefined group name reference: century (IndexError)
//}
@see MatchData#begin, MatchData#end......# => [0, 4]
p $~.offset(:year) # => [0, 4]
p $~.offset('month') # => [5, 6]
p $~.offset(:month) # => [5, 6]
p $~.offset('day') # => [nil, nil]
p $~.offset('century') # => `offset': undefined group name reference: century (IndexError)
//}
@see MatchData#begin, MatchData#end, MatchData#o... -
Socket
. getaddrinfo(nodename , servname , family=nil , socktype=nil , protocol=nil , flags=nil) -> Array (434.0) -
2553で定義された getaddrinfo() の機能を提供するクラスメソッド。この関数は gethostbyname() や getservbyname() の代わりとして用意されており、 IP のバージョンに依存しないプログラムを書くための標準的な API です。
...ート番号 (Integer)
* 第2要素 - ホスト名 (String)
* 第3要素 - アドレス (String)
* 第4要素 - アドレスファミリーに対応する Integer
* 第5要素 - ソケットタイプに対応する Integer
* 第6要素 - プロトコルに対応する Integer
=== 必須......ocket.gethostname, "ftp")
#=> [["AF_INET", 21, "helium.ruby-lang.org", "210.251.121.214", 2, 1, 6]]
pp Socket.getaddrinfo(Socket.gethostname, nil)
#=> [["AF_INET", 0, "helium.ruby-lang.org", "210.251.121.214", 2, 1, 6],
# ["AF_INET", 0, "helium.ruby-lang.org", "210.251.121.214", 2, 2,...