種類
ライブラリ
- English (120)
- ビルトイン (1118)
- benchmark (48)
-
cgi
/ core (48) - csv (24)
- date (90)
-
digest
/ sha1 (12) -
digest
/ sha2 (36) - drb (12)
- e2mmap (6)
- etc (396)
- fiddle (204)
-
fiddle
/ import (12) - fileutils (24)
-
io
/ console (24) -
irb
/ context (36) -
irb
/ input-method (60) - json (132)
-
json
/ add / date _ time (12) - logger (1)
- matrix (43)
-
minitest
/ spec (2) -
minitest
/ unit (2) - mkmf (72)
-
net
/ ftp (48) -
net
/ http (90) -
net
/ pop (24) -
net
/ smtp (12) - objspace (24)
- openssl (120)
- pathname (24)
- profiler (30)
- psych (26)
- rake (36)
-
rake
/ packagetask (12) - rbconfig (13)
-
rbconfig
/ sizeof (12) -
rdoc
/ context (12) - resolv (12)
-
rexml
/ document (24) -
rubygems
/ dependency _ list (12) -
rubygems
/ exceptions (12) -
rubygems
/ requirement (12) - socket (564)
- stringio (36)
- strscan (48)
- sync (12)
- thread (4)
- thwait (12)
- time (96)
- timeout (8)
- tracer (12)
- tsort (12)
-
webrick
/ httpauth / authenticator (24) -
webrick
/ httpstatus (12) -
webrick
/ log (12) - win32ole (72)
- zlib (72)
クラス
-
ARGF
. class (36) - Array (131)
-
Benchmark
:: Tms (24) - CGI (36)
- CSV (24)
- Data (3)
- Date (3)
- DateTime (99)
- Encoding (48)
-
Encoding
:: Converter (60) - Enumerator (24)
-
Enumerator
:: Lazy (12) -
Fiddle
:: Pointer (48) -
Gem
:: DependencyList (12) - IO (160)
-
IRB
:: Context (36) -
IRB
:: InputMethod (12) -
IRB
:: ReadlineInputMethod (24) -
IRB
:: StdioInputMethod (24) - Integer (48)
-
JSON
:: State (60) - MatchData (58)
- Matrix (36)
- Method (12)
- Module (24)
-
Net
:: FTP (48) - Numeric (12)
- Object (50)
-
OpenSSL
:: PKey :: RSA (12) -
OpenSSL
:: SSL :: SSLContext (12) - Pathname (24)
- Proc (12)
-
Psych
:: SyntaxError (12) -
RDoc
:: Context (12) -
REXML
:: DocType (24) -
Rake
:: FileList (24) -
Rake
:: PackageTask (12) -
Resolv
:: DNS :: Name (12) -
RubyVM
:: InstructionSequence (48) - Socket (276)
-
Socket
:: Option (12) - String (30)
- StringIO (36)
- StringScanner (48)
- Struct (8)
- Symbol (12)
- Thread (24)
- Time (171)
- Tracer (12)
- Vector (7)
-
WEBrick
:: BasicLog (12) - WIN32OLE (24)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ METHOD (12) -
WIN32OLE
_ PARAM (12) -
Zlib
:: GzipReader (48)
モジュール
- Benchmark (24)
-
CGI
:: QueryExtension (12) - Etc (396)
- Fiddle (156)
-
Fiddle
:: Importer (12) -
File
:: Constants (12) - FileUtils (24)
-
GC
:: Profiler (96) - JSON (24)
- Kernel (240)
-
MiniTest
:: Assertions (2) - ObjectSpace (48)
-
OpenSSL
:: ASN1 (12) -
OpenSSL
:: Buffering (24) -
OpenSSL
:: OCSP (12) -
OpenSSL
:: SSL (24) -
OpenSSL
:: X509 (12) - Process (24)
-
Profiler
_ _ (24) - Psych (14)
- RbConfig (24)
-
RubyVM
:: AbstractSyntaxTree (3) -
Socket
:: Constants (276) - TSort (12)
-
WEBrick
:: HTTPAuth :: Authenticator (12) -
WEBrick
:: HTTPAuth :: ProxyAuthenticator (12)
キーワード
-
$ ARGV (12) -
$ DEFAULT _ INPUT (12) -
$ INPUT _ LINE _ NUMBER (12) -
$ LAST _ PAREN _ MATCH (12) -
$ LAST _ READ _ LINE (12) -
$ NR (12) -
$ OFS (12) -
$ ORS (12) -
$ OUTPUT _ FIELD _ SEPARATOR (12) -
$ OUTPUT _ RECORD _ SEPARATOR (12) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - === (12)
- APOPSession (12)
- Application (1)
- Bignum (9)
-
CLOCK
_ PROF (12) -
CS
_ POSIX _ V6 _ ILP32 _ OFF32 _ CFLAGS (12) -
CS
_ POSIX _ V6 _ ILP32 _ OFF32 _ LDFLAGS (12) -
CS
_ POSIX _ V6 _ ILP32 _ OFF32 _ LIBS (12) -
CS
_ POSIX _ V6 _ ILP32 _ OFFBIG _ CFLAGS (12) -
CS
_ POSIX _ V6 _ ILP32 _ OFFBIG _ LDFLAGS (12) -
CS
_ POSIX _ V6 _ ILP32 _ OFFBIG _ LIBS (12) -
CS
_ POSIX _ V6 _ LP64 _ OFF64 _ CFLAGS (12) -
CS
_ POSIX _ V6 _ LP64 _ OFF64 _ LDFLAGS (12) -
CS
_ POSIX _ V6 _ LP64 _ OFF64 _ LIBS (12) -
CS
_ POSIX _ V6 _ LPBIG _ OFFBIG _ CFLAGS (12) -
CS
_ POSIX _ V6 _ LPBIG _ OFFBIG _ LDFLAGS (12) -
CS
_ POSIX _ V6 _ LPBIG _ OFFBIG _ LIBS (12) -
CS
_ POSIX _ V7 _ ILP32 _ OFF32 _ CFLAGS (12) -
CS
_ POSIX _ V7 _ ILP32 _ OFF32 _ LDFLAGS (12) -
CS
_ POSIX _ V7 _ ILP32 _ OFF32 _ LIBS (12) -
CS
_ POSIX _ V7 _ ILP32 _ OFFBIG _ CFLAGS (12) -
CS
_ POSIX _ V7 _ ILP32 _ OFFBIG _ LDFLAGS (12) -
CS
_ POSIX _ V7 _ ILP32 _ OFFBIG _ LIBS (12) -
CS
_ POSIX _ V7 _ LP64 _ OFF64 _ CFLAGS (12) -
CS
_ POSIX _ V7 _ LP64 _ OFF64 _ LDFLAGS (12) -
CS
_ POSIX _ V7 _ LP64 _ OFF64 _ LIBS (12) -
CS
_ POSIX _ V7 _ LPBIG _ OFFBIG _ CFLAGS (12) -
CS
_ POSIX _ V7 _ LPBIG _ OFFBIG _ LDFLAGS (12) -
CS
_ POSIX _ V7 _ LPBIG _ OFFBIG _ LIBS (12) - ConditionVariable (12)
- Config (1)
- DRbIdConv (12)
- E2MM (6)
- EOFError (12)
- EndOfYAMLException (12)
- ErrNoFinishedThread (6)
- Extend (12)
- FORMAT (24)
- FileList (12)
- Fixnum (9)
- HTTPClientException (7)
- HTTPGatewayTimeOut (7)
- HTTPMovedTemporarily (12)
- HTTPMultipleChoice (12)
- HTTPRequestEntityTooLarge (7)
- HTTPRequestTimeOut (7)
- HTTPRequestURITooLarge (12)
- HTTPRequestURITooLong (7)
- HTTPRequestedRangeNotSatisfiable (7)
- HTTPSession (12)
-
IFF
_ MASTER (24) -
IFF
_ NOTRAILERS (24) -
IFF
_ SLAVE (24) -
IFF
_ SUPP _ NOFCS (24) -
IPV6
_ RTHDR (24) -
IPV6
_ RTHDRDSTOPTS (24) -
IP
_ MTU (24) -
IP
_ ROUTER _ ALERT (24) -
IP
_ TOS (24) - InfoField (12)
- Integer (12)
-
MAKEFILE
_ CONFIG (12) -
MAX
_ MULTIPART _ COUNT (12) -
MAX
_ MULTIPART _ LENGTH (12) -
MSG
_ COMPAT (24) -
MSG
_ EOF (24) -
MSG
_ FLUSH (24) -
MSG
_ OOB (24) - Marshal フォーマット (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 7 . 0 (6) -
NI
_ NOFQDN (24) - NOFOLLOW (12)
- NilClass (12)
-
OP
_ MICROSOFT _ BIG _ SSLV3 _ BUFFER (12) -
OP
_ MICROSOFT _ SESS _ ID _ BUG (12) - POPSession (12)
-
PROFILE
_ PROC (6) - Profiler (12)
-
Profiler
_ _ (6) -
REVOKED
_ STATUS _ CESSATIONOFOPERATION (12) -
RLIMIT
_ NOFILE (12) - Requirement (12)
- ResponseInfoField (12)
- Ruby用語集 (12)
-
SC
_ V6 _ ILP32 _ OFF32 (12) -
SC
_ V6 _ ILP32 _ OFFBIG (12) -
SC
_ V6 _ LP64 _ OFF64 (12) -
SC
_ V6 _ LPBIG _ OFFBIG (12) -
SC
_ V7 _ ILP32 _ OFF32 (12) -
SC
_ V7 _ ILP32 _ OFFBIG (12) -
SC
_ V7 _ LP64 _ OFF64 (12) -
SC
_ V7 _ LPBIG _ OFFBIG (12) -
SESSION
_ CACHE _ OFF (12) - SHA1 (12)
- SHA256 (12)
- SHA384 (12)
- SHA512 (12)
- SIZEOF (12)
-
SIZEOF
_ CHAR (12) -
SIZEOF
_ DOUBLE (12) -
SIZEOF
_ FLOAT (12) -
SIZEOF
_ INT (12) -
SIZEOF
_ INTPTR _ T (12) -
SIZEOF
_ LONG (12) -
SIZEOF
_ LONG _ LONG (12) -
SIZEOF
_ PTRDIFF _ T (12) -
SIZEOF
_ SHORT (12) -
SIZEOF
_ SIZE _ T (12) -
SIZEOF
_ SSIZE _ T (12) -
SIZEOF
_ UINTPTR _ T (12) -
SIZEOF
_ VOIDP (12) -
SJIS
_ SOFTBANK (12) -
SJIS
_ SoftBank (12) - SMTPSession (12)
-
SO
_ BROADCAST (24) -
SO
_ OOBINLINE (24) -
SO
_ PEERCRED (24) -
SO
_ PEERNAME (24) - Signer (12)
- SizedQueue (12)
- String (12)
- Synchronizer (6)
-
Synchronizer
_ m (6) -
TCP
_ KEEPCNT (24) -
TCP
_ LINGER2 (24) -
TCP
_ NOPUSH (24) -
TCP
_ SYNCNT (24) -
TCP
_ WINDOW _ CLAMP (24) - ThWait (6)
- TimeoutError (8)
-
UTF8
_ SOFTBANK (12) -
UTF8
_ SoftBank (12) -
V
_ ERR _ OUT _ OF _ MEM (12) -
WIN32OLE
_ TYPELIB (12) - ZStream (12)
- [] (36)
- []= (31)
- advise (12)
-
assert
_ instance _ of (1) -
assert
_ kind _ of (1) -
attribute
_ of (12) -
attributes
_ of (12) - autoload (24)
- autoload? (12)
-
base
_ label (12) - begin (12)
-
beginning
_ of _ line? (12) - benchmark (12)
- bigdecimal (12)
- binread (12)
- binwrite (24)
- bol? (12)
-
buffer
_ initial _ length (12) -
buffer
_ initial _ length= (12) - bytebegin (2)
- byteend (2)
- byteindex (3)
- byteoffset (6)
- byterindex (3)
-
check
_ circular? (12) -
check
_ signedness (24) -
check
_ sizeof (24) - chr (24)
- civil (12)
- clear (12)
- coerce (12)
- cofactor (12)
-
cofactor
_ expansion (12) - combination (24)
- commercial (12)
-
convertible
_ int (24) -
copy
_ stream (12) - curry (12)
-
deconstruct
_ keys (12) -
defined
_ in? (12) - depth (12)
-
digest
/ sha1 (12) -
digest
/ sha2 (12) - digits (24)
- disable (12)
-
each
_ object (24) - enable (12)
- enabled? (12)
- end (12)
-
end
_ with? (6) - eof (48)
- eof? (72)
- fatal (12)
- fetch (12)
-
fetch
_ values (2) -
first
_ lineno (12) - format (12)
- generate (12)
- getlocal (12)
- gets (12)
-
gmt
_ offset (12) - gmtoff (12)
-
handle
_ interrupt (12) - httpdate (24)
-
ignore
_ eof (12) -
ignore
_ eof= (12) -
ignore
_ eof? (12) -
instance
_ of? (12) - ioflush (12)
- iqmp (12)
-
irb
/ completion (12) -
is
_ a? (24) - iso8601 (12)
- jd (12)
-
kind
_ of? (24) - label (12)
-
laplace
_ expansion (12) - linger (12)
- localtime (12)
-
memsize
_ of (12) -
memsize
_ of _ all (12) -
must
_ be _ instance _ of (1) -
must
_ be _ kind _ of (1) -
net
/ imap (12) - new (56)
-
new
_ offset (12) - off (12)
-
off
_ event (12) - offset (48)
-
offset
_ vtbl (12) - oflush (12)
-
ole
_ activex _ initialize (12) -
ole
_ show _ help (12) - optparse (12)
- ordinal (12)
-
os
_ obj _ of (12) - output? (12)
- pack (21)
- pack テンプレート文字列 (12)
- permutation (24)
- pointer= (12)
- pos= (12)
- pread (8)
-
primitive
_ convert (48) -
primitive
_ errinfo (12) - print (12)
-
print
_ profile (6) - profile (6)
- profiler (6)
- pwrite (8)
-
raw
_ data (12) -
rb
_ mod _ const _ of (12) -
rb
_ obj _ is _ instance _ of (12) -
rb
_ obj _ is _ kind _ of (12) -
rb
_ time _ timespec _ new (10) -
rbconfig
/ sizeof (12) - rdoc (12)
-
rdoc
/ generator / json _ index (12) - read (12)
-
readable
_ atfer _ eof? (36) - readbyte (12)
- readchar (24)
- readline (24)
-
remove
_ entry _ secure (12) -
repeated
_ combination (24) -
repeated
_ permutation (24) - report (12)
- result (12)
- retrbinary (24)
- rfc2822 (24)
- rfc822 (24)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby2
_ keywords (12) -
rubygems
/ commands / generate _ index _ command (12) -
rubygems
/ commands / pristine _ command (12) -
rubygems
/ commands / query _ command (12) -
rubygems
/ commands / search _ command (12) -
rubygems
/ commands / specification _ command (12) -
rubygems
/ commands / uninstall _ command (12) -
rubygems
/ security (12) -
safe
_ load (14) - seek (48)
-
server
_ software (12) - sizeof (12)
-
source
_ location (12) -
spec
_ predecessors (12) -
start
_ profile (6) -
start
_ with? (6) -
stop
_ profile (6) - storbinary (24)
- strftime (12)
-
subdomain
_ of? (12) - sysconf (12)
- sysseek (12)
-
test
/ unit (12) - timeofday (12)
-
to
_ f (12) -
to
_ json (12) -
total
_ time (12) - traverse (12)
-
tsort
_ each _ child (12) - unpack (12)
- unparse (12)
-
utc
_ offset (12) -
with
_ index (36) - write (24)
- xmlrpc (3)
- xmlschema (12)
- パターンマッチ (12)
- 変数と定数 (5)
検索結果
先頭5件
-
IO
. write(path , string , offset=nil , **opts) -> Integer (26200.0) -
path で指定されるファイルを開き、string を書き込み、 閉じます。
...を開き、string を書き込み、
閉じます。
Kernel.#open と同様 path の先頭が "|" ならば、"|" に続くコマンドを実行し、コマンドの出力を標準出力に書き込みます。
offset を指定するとその位置までシークします。
offset を指定し......くは IO.open を見てください。
@param path ファイル名文字列
@param string 書き込む文字列
@param offset 書き込み開始位置
@param opts ファイルを開くときのキーワード引数
//emlist[例][ruby]{
text = "This is line one\nThis is line two\nThis is line thre......e\nAnd so on...\n"
IO.write("testfile", text) # => 66
IO.write("testfile", "0123456789", 20) #=> 10
IO.read("testfile")
# => "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n"
IO.write("testfile", "0123456789") #=> 10
IO.read("testfile") #... -
Integer
# digits -> [Integer] (26106.0) -
base を基数として self を位取り記数法で表記した数値を配列で返します。 base を指定しない場合の基数は 10 です。
...10 です。
//emlist[][ruby]{
16.digits # => [6, 1]
16.digits(16) # => [0, 1]
//}
self は非負整数でなければいけません。非負整数でない場合は、Math::DomainErrorが発生します。
//emlist[][ruby]{
-10.digits # Math::DomainError: out of domain が発生
//}
@ret......urn 位取り記数法で表した時の数値の配列
@param base 基数となる数値。
@raise ArgumentError base に正の整数以外を指定した場合に発生します。
@raise Math::DomainError 非負整数以外に対して呼び出した場合に発生します。... -
Integer
# digits(base) -> [Integer] (26106.0) -
base を基数として self を位取り記数法で表記した数値を配列で返します。 base を指定しない場合の基数は 10 です。
...10 です。
//emlist[][ruby]{
16.digits # => [6, 1]
16.digits(16) # => [0, 1]
//}
self は非負整数でなければいけません。非負整数でない場合は、Math::DomainErrorが発生します。
//emlist[][ruby]{
-10.digits # Math::DomainError: out of domain が発生
//}
@ret......urn 位取り記数法で表した時の数値の配列
@param base 基数となる数値。
@raise ArgumentError base に正の整数以外を指定した場合に発生します。
@raise Math::DomainError 非負整数以外に対して呼び出した場合に発生します。... -
IO
. read(path , length = nil , offset = 0 , **opt) -> String | nil (23300.0) -
path で指定されたファイルを offset 位置から length バイト分読み込んで返します。
...されたファイルを offset 位置から
length バイト分読み込んで返します。
既に EOF に達している場合は nil を返します。ただし、length に nil か 0 が指定されている場合は、空文字列 "" を返します。例えば、IO.read(空ファイル) は......。nil であるか省略した場合には、EOF まで読み込みます。
@param offset 読み込みを始めるオフセットを整数で指定します。
@param opt ファイル path を open する時に使われるオプションをキーワード引数で指定します。
@raise Errno......X path のオープン、offset 位置への設定、ファイルの読み込みに失敗した場合に発生します。
@raise ArgumentError length が負の場合に発生します。
キーワード引数で有効なキーと値は以下のとおりです。
: :encoding
読み込んだ... -
Integer
# chr(encoding) -> String (23206.0) -
self を文字コードとして見た時に、引数で与えたエンコーディング encoding に対応する文字を返します。
...ーディング encoding に対応する文字を返します。
//emlist[][ruby]{
p 65.chr
# => "A"
p 12354.chr
# => `chr': 12354 out of char range (RangeError)
p 12354.chr(Encoding::UTF_8)
# => "あ"
p 12354.chr(Encoding::EUC_JP)
# => RangeError: invalid codepoint 0x3042 in EUC-JP
//}
引数無......SCII、ASCII-8BIT、デフォルト内部エンコーディングの順で優先的に解釈します。
//emlist[][ruby]{
p 0x79.chr.encoding # => #<Encoding:US_ASCII>
p 0x80.chr.encoding # => #<Encoding:ASCII_8BIT>
//}
@param encoding エンコーディングを表すオブジェクト。Encodin......g::UTF_8、'shift_jis' など。
@return 一文字からなる文字列
@raise RangeError self を与えられたエンコーディングで正しく解釈できない場合に発生します。
@see String#ord Encoding.default_internal... -
IO
# pread(maxlen , offset , outbuf = "") -> string (23200.0) -
preadシステムコールを使ってファイルポインタを変更せずに、また現在のファイルポインタに 依存せずにmaxlenバイト読み込みます。
...みます。
IO#seekとIO#readの組み合わせと比べて、アトミックな操作に
なるという点が優れていて、複数スレッド/プロセスから同じIOオブジェクトを
様々な位置から読み込むことを許します。
どのユーザー空間のIO層のバッフ......@param offset 読み込み開始位置のファイルの先頭からのオフセットを指定します。
@param outbuf データを受け取る String を指定します。
@raise Errno::EXXX シークまたは書き込みが失敗した場合に発生します。
@raise EOFError EOF に到達......ます。
@raise NotImplementedError システムコールがサポートされていない OS で発生します。
//emlist[例][ruby]{
File.write("testfile", "This is line one\nThis is line two\n")
File.open("testfile") do |f|
p f.read # => "This is line one\nThis is line two\n"
p... -
IO
# seek(offset , whence = IO :: SEEK _ SET) -> 0 (23200.0) -
ファイルポインタを whence の位置から offset だけ移動させます。 offset 位置への移動が成功すれば 0 を返します。
...ファイルポインタを whence の位置から offset だけ移動させます。
offset 位置への移動が成功すれば 0 を返します。
@param offset ファイルポインタを移動させるオフセットを整数で指定します。
@param whence 値は以下のいずれかで......* IO::SEEK_SET: ファイルの先頭から (デフォルト)
* IO::SEEK_CUR: 現在のファイルポインタから
* IO::SEEK_END: ファイルの末尾から
* IO::SEEK_DATA: offset 以降の次にデータがある位置へ(lseek の man ページ参照。Linux 3.1 以降のみ)
* IO:......:SEEK_HOLE: offset 以降の次にホールがある位置へ(同上)
@raise Errno::EXXX ファイルポインタの移動に失敗した場合に発生します。
@raise IOError 既に close されていた場合に発生します。
f = File.new("testfile")
f.seek(-13, IO::SEEK_END)... -
IO
# sysseek(offset , whence = IO :: SEEK _ SET) -> Integer (23200.0) -
lseek(2) と同じです。IO#seek では、 IO#sysread, IO#syswrite と併用すると正しく動作しないので代わりにこのメソッドを使います。 位置 offset への移動が成功すれば移動した位置(ファイル先頭からのオフセット)を返します。
...lseek(2) と同じです。IO#seek では、
IO#sysread, IO#syswrite と併用すると正しく動作しないので代わりにこのメソッドを使います。
位置 offset への移動が成功すれば移動した位置(ファイル先頭からのオフセット)を返します。
書き......された IO に対して実行すると警告が出ます。
File.open("/dev/zero") {|f|
buf = f.read(3)
f.sysseek(0)
}
# => -:3:in `sysseek': sysseek for buffered IO (IOError)
File.open("/dev/null", "w") {|f|
f.print "foo"
f.sysseek(0)
}
# => -:3: warning: sysseek f......fered IO
@param offset ファイルポインタを移動させるオフセットを整数で指定します。
@param whence 値は以下のいずれかです。
それぞれ代わりに :SET、:CUR、:END、:DATA、:HOLE を指定す
る事も可能です。
* IO::S... -
IO
. copy _ stream(src , dst , copy _ length , src _ offset) -> Integer (23200.0) -
指定された src から dst へコピーします。 コピーしたバイト数を返します。
...指定された src から dst へコピーします。
コピーしたバイト数を返します。
コピー元の src が IO オブジェクトの場合は、src のオフセットから
ファイル名の場合はファイルの最初からコピーを開始します。
コピー先の dst......す。
src が IO オブジェクトでかつ src_offset が指定されている場合、
src のオフセット(src.pos)は変更されません。
@param src コピー元となる IO オブジェクトかファイル名を指定します。
@param dst コピー先となる IO オブジェク......nil を指定した場合、コピーする長さに制限はありません。
@param src_offset コピーを始めるオフセットを数値で指定します。
//emlist[例][ruby]{
IO.write("filetest", "abcdefghij")
IO.copy_stream("filetest", "filecopy", 2) # => 2
IO.read("filecopy...
