別のキーワード
ライブラリ
- ビルトイン (1400)
- bigdecimal (24)
-
bigdecimal
/ util (12) -
cgi
/ core (108) -
cgi
/ html (216) -
cgi
/ session (108) -
cgi
/ session / pstore (24) - csv (132)
- date (72)
- drb (12)
- e2mmap (30)
- fiddle (60)
-
fiddle
/ import (48) - getoptlong (12)
-
io
/ console (24) -
io
/ wait (36) -
irb
/ context (12) -
irb
/ input-method (60) -
irb
/ output-method (12) -
json
/ add / rational (12) - logger (38)
- matrix (312)
-
minitest
/ spec (1) -
minitest
/ unit (11) - mkmf (24)
- monitor (78)
-
net
/ ftp (48) -
net
/ http (48) -
net
/ imap (192) -
net
/ smtp (24) - open-uri (36)
- openssl (336)
- optparse (360)
- pathname (36)
- prime (72)
- pstore (12)
- psych (84)
- rake (168)
-
rake
/ loaders / makefile (12) -
rake
/ rdoctask (48) -
rdoc
/ code _ object (24) -
rdoc
/ context (144) -
rdoc
/ generator / darkfish (12) -
rdoc
/ generator / ri (12) -
rdoc
/ markdown (48) -
rdoc
/ parser / c (12) -
rdoc
/ top _ level (12) - resolv (12)
-
rexml
/ document (336) -
rexml
/ parsers / pullparser (12) -
rexml
/ sax2listener (36) -
rexml
/ streamlistener (24) - rss (456)
- rubygems (60)
-
rubygems
/ command (108) -
rubygems
/ commands / unpack _ command (12) -
rubygems
/ commands / update _ command (12) -
rubygems
/ dependency (24) -
rubygems
/ dependency _ installer (24) -
rubygems
/ dependency _ list (36) -
rubygems
/ gem _ path _ searcher (24) -
rubygems
/ indexer (48) -
rubygems
/ installer (24) -
rubygems
/ old _ format (12) -
rubygems
/ package / tar _ header (12) -
rubygems
/ package / tar _ input (36) -
rubygems
/ package / tar _ reader (12) -
rubygems
/ package / tar _ writer (96) -
rubygems
/ remote _ fetcher (12) -
rubygems
/ requirement (12) -
rubygems
/ source _ index (60) -
rubygems
/ specification (420) -
rubygems
/ user _ interaction (36) -
rubygems
/ version (24) -
rubygems
/ version _ option (24) - shell (42)
-
shell
/ builtin-command (6) -
shell
/ command-processor (84) -
shell
/ filter (42) -
shell
/ process-controller (6) - socket (120)
- stringio (362)
- thread (6)
- time (24)
- tracer (12)
- uri (24)
-
webrick
/ cgi (12) -
webrick
/ httpresponse (24) -
webrick
/ httpserver (12) -
webrick
/ httpservlet / abstract (12) -
webrick
/ httpservlet / filehandler (12) -
webrick
/ httpservlet / prochandler (12) -
win32
/ registry (36) - zlib (264)
クラス
-
ARGF
. class (204) - Array (76)
- BasicSocket (24)
- BigDecimal (24)
- Binding (7)
- CGI (12)
-
CGI
:: Session (36) -
CGI
:: Session :: FileStore (24) -
CGI
:: Session :: MemoryStore (24) -
CGI
:: Session :: NullStore (24) -
CGI
:: Session :: PStore (24) - CSV (132)
-
DRb
:: DRbUnknown (12) - Date (36)
- DateTime (36)
- Dir (11)
- Encoding (12)
-
Encoding
:: Converter (72) -
Encoding
:: InvalidByteSequenceError (24) -
Encoding
:: UndefinedConversionError (60) - Exception (20)
-
Fiddle
:: Function (60) -
Gem
:: Command (108) -
Gem
:: Commands :: UnpackCommand (12) -
Gem
:: Commands :: UpdateCommand (12) -
Gem
:: Dependency (24) -
Gem
:: DependencyInstaller (24) -
Gem
:: DependencyList (36) -
Gem
:: GemPathSearcher (24) -
Gem
:: Indexer (48) -
Gem
:: Installer (24) -
Gem
:: LoadError (24) -
Gem
:: OldFormat (12) -
Gem
:: Package :: TarHeader (12) -
Gem
:: Package :: TarInput (36) -
Gem
:: Package :: TarReader (12) -
Gem
:: Package :: TarWriter (72) -
Gem
:: Package :: TarWriter :: BoundedStream (12) -
Gem
:: Package :: TarWriter :: RestrictedStream (12) -
Gem
:: RemoteFetcher (12) -
Gem
:: Requirement (12) -
Gem
:: SourceIndex (60) -
Gem
:: Specification (420) -
Gem
:: Version (24) - GetoptLong (12)
- IO (472)
-
IRB
:: Context (12) -
IRB
:: StdioInputMethod (60) -
IRB
:: StdioOutputMethod (12) - Integer (12)
-
Logger
:: Application (2) -
Logger
:: LogDevice (36) - Matrix (72)
-
Matrix
:: EigenvalueDecomposition (120) -
Matrix
:: LUPDecomposition (120) - Method (12)
-
MiniTest
:: Unit (1) - Module (61)
- Monitor (6)
-
MonitorMixin
:: ConditionVariable (60) -
Net
:: FTP (48) -
Net
:: HTTP (24) -
Net
:: HTTPGenericRequest (24) -
Net
:: IMAP (12) -
Net
:: IMAP :: BodyTypeBasic (36) -
Net
:: IMAP :: BodyTypeMessage (36) -
Net
:: IMAP :: BodyTypeMultipart (24) -
Net
:: IMAP :: BodyTypeText (36) -
Net
:: IMAP :: ContentDisposition (24) -
Net
:: IMAP :: ContinuationRequest (24) -
Net
:: SMTP (24) - Object (12)
-
OpenSSL
:: Config (12) -
OpenSSL
:: OCSP :: BasicResponse (12) -
OpenSSL
:: SSL :: SSLContext (60) -
OpenSSL
:: SSL :: SSLSocket (24) -
OpenSSL
:: SSL :: Session (24) -
OpenSSL
:: X509 :: CRL (12) -
OpenSSL
:: X509 :: Certificate (12) -
OpenSSL
:: X509 :: Extension (36) -
OpenSSL
:: X509 :: ExtensionFactory (24) -
OpenSSL
:: X509 :: Revoked (36) - OptionParser (336)
- PStore (12)
- Pathname (36)
- Prime (24)
-
Prime
:: TrialDivisionGenerator (36) -
Psych
:: Emitter (24) -
Psych
:: Handler (12) -
Psych
:: Nodes :: Document (24) -
Psych
:: Nodes :: Node (24) -
RDoc
:: CodeObject (24) -
RDoc
:: Context (60) -
RDoc
:: Context :: Section (84) -
RDoc
:: Generator :: Darkfish (12) -
RDoc
:: Generator :: RI (12) -
RDoc
:: Markdown (48) -
RDoc
:: Options (840) -
RDoc
:: Parser :: C (12) -
RDoc
:: TopLevel (12) -
REXML
:: AttlistDecl (12) -
REXML
:: Attribute (12) -
REXML
:: Child (24) -
REXML
:: Declaration (24) -
REXML
:: DocType (36) -
REXML
:: Document (36) -
REXML
:: Element (12) -
REXML
:: Entity (12) -
REXML
:: ExternalEntity (12) -
REXML
:: Formatters :: Default (12) -
REXML
:: Instruction (12) -
REXML
:: NotationDecl (84) -
REXML
:: Parsers :: PullEvent (12) -
REXML
:: XMLDecl (36) -
RSS
:: Maker :: ChannelBase (24) -
RSS
:: Maker :: ImageBase (24) -
RSS
:: Maker :: ItemsBase :: ItemBase (24) -
RSS
:: Maker :: TextinputBase (24) -
RSS
:: RDF (48) -
RSS
:: RDF :: Channel (24) -
RSS
:: RDF :: Item (24) -
RSS
:: RDF :: Textinput (24) -
RSS
:: Rss :: Channel (24) -
RSS
:: Rss :: Channel :: Image (24) -
RSS
:: Rss :: Channel :: Item (24) -
RSS
:: Rss :: Channel :: TextInput (24) -
Rake
:: Application (36) -
Rake
:: FileCreationTask (12) -
Rake
:: FileList (12) -
Rake
:: FileTask (12) -
Rake
:: InvocationChain (12) -
Rake
:: InvocationChain :: EmptyInvocationChain (12) -
Rake
:: MakefileLoader (12) -
Rake
:: RDocTask (48) -
Rake
:: Task (24) - Rational (81)
-
Resolv
:: DNS :: Resource :: IN :: SRV (12) -
RubyVM
:: InstructionSequence (34) - Shell (42)
-
Shell
:: AppendIO (6) -
Shell
:: CommandProcessor (84) -
Shell
:: Filter (42) -
Shell
:: ProcessController (6) - Socket (24)
-
Socket
:: AncillaryData (12) -
Socket
:: Option (24) - String (90)
- StringIO (362)
- Symbol (9)
- Thread (90)
-
Thread
:: Backtrace :: Location (84) -
Thread
:: ConditionVariable (36) - Time (24)
- TracePoint (12)
- Tracer (12)
- UDPSocket (12)
- UNIXSocket (24)
-
URI
:: LDAP (24) - UnboundMethod (12)
-
WEBrick
:: CGI (12) -
WEBrick
:: HTTPResponse (24) -
WEBrick
:: HTTPServer (12) -
WEBrick
:: HTTPServlet :: AbstractServlet (12) -
WEBrick
:: HTTPServlet :: FileHandler (12) -
WEBrick
:: HTTPServlet :: ProcHandler (12) -
Win32
:: Registry (36) -
Zlib
:: Deflate (12) -
Zlib
:: GzipFile (24) -
Zlib
:: GzipReader (204) -
Zlib
:: GzipWriter (12) -
Zlib
:: Inflate (12)
モジュール
-
CGI
:: HtmlExtension (216) -
CGI
:: QueryExtension (84) -
CGI
:: QueryExtension :: Value (12) - DublinCoreModel (72)
- Enumerable (12)
- Exception2MessageMapper (30)
-
Fiddle
:: Importer (48) -
Gem
:: DefaultUserInteraction (36) -
Gem
:: InstallUpdateOptions (24) -
Gem
:: LocalRemoteOptions (60) -
Gem
:: QuickLoader (36) -
Gem
:: VersionOption (24) - Kernel (36)
-
MiniTest
:: Assertions (10) - MonitorMixin (12)
-
OpenSSL
:: Buffering (72) -
OpenSSL
:: SSL :: SocketForwarder (12) -
OpenURI
:: OpenRead (36) -
OptionParser
:: Arguable (24) -
REXML
:: Node (12) -
REXML
:: SAX2Listener (36) -
REXML
:: StreamListener (24) -
RSS
:: SyndicationModel (72) -
Rake
:: TaskManager (24)
キーワード
- - (12)
- == (12)
- Fail (6)
- Raise (6)
- [] (24)
-
_ dump (12) - abbreviate (12)
- abi (12)
-
abort
_ on _ exception (12) -
abort
_ on _ exception= (12) -
absolute
_ path (12) -
accept
_ encoding (12) -
add
_ bindir (12) -
add
_ bulk _ threshold _ option (12) -
add
_ class _ or _ module (24) -
add
_ dependency (12) -
add
_ description (12) -
add
_ development _ dependency (12) -
add
_ extension (36) -
add
_ file (24) -
add
_ file _ simple (24) -
add
_ loader (12) -
add
_ option (12) -
add
_ platform _ option (12) -
add
_ proxy _ option (12) -
add
_ runtime _ dependency (12) -
add
_ source _ option (12) -
add
_ spec (12) -
add
_ update _ sources _ option (12) -
add
_ value (12) -
add
_ version _ option (12) - advise (12)
- ajd (12)
-
all
_ one _ file (12) - amjd (12)
- append (42)
-
arg
_ description (12) -
assert
_ equal (1) -
assert
_ in _ delta (1) -
assert
_ in _ epsilon (1) -
assert
_ includes (1) -
assert
_ kind _ of (1) -
assert
_ operator (1) -
assert
_ respond _ to (1) -
assert
_ same (1) -
assert
_ send (1) -
assign
_ defaults (12) - atime (6)
-
backtrace
_ locations (36) -
base
_ label (12) - bind (18)
- bindir (12)
- bindir= (12)
- binmode (48)
- binmode? (36)
- binread (12)
- blockdev? (18)
- body (12)
- body= (12)
-
body
_ stream (12) -
body
_ stream= (12) - broadcast (24)
-
build
_ extensions (12) -
calculate
_ integers _ for _ gem _ version (12) - call (12)
- chardev? (18)
- charset (12)
-
check
_ closed (12) - checkbox (12)
- chunk (12)
- close (12)
-
close
_ read (36) - closed? (60)
-
closed
_ read? (12) -
closed
_ write? (12) - codepoints (28)
- comment (12)
- compress (12)
-
connect
_ nonblock (12) -
const
_ source _ location (12) - cooked (12)
- cooked! (12)
-
coverage
_ report (12) -
coverage
_ report= (12) - create (12)
-
create
_ body (12) -
create
_ ext (12) -
create
_ extension (12) - css (12)
- ctime (6)
-
current
_ section (12) - data (24)
- date (12)
- date= (12)
-
dc
_ description (12) -
dc
_ description= (12) -
dc
_ descriptions (12) -
dc
_ relation (12) -
dc
_ relation= (12) -
dc
_ relations (12) -
debug
_ output= (12) -
def
_ exception (6) -
default
_ argv (12) -
default
_ argv= (12) -
default
_ executable (12) -
default
_ executable= (12) -
definition
_ lists (12) -
definition
_ lists= (12) - delete (60)
- denominator (12)
- dependencies (12)
-
dependency
_ order (12) -
dependent
_ gems (12) - desc (12)
- description (192)
- description= (144)
-
destination
_ encoding (36) -
destination
_ encoding _ name (24) - det (12)
-
det
_ e (12) - determinant (12)
-
determinant
_ e (12) - dev (12)
-
development
_ dependencies (12) - diagram (12)
- directory? (18)
- disasm (12)
- disassemble (12)
- display (12)
- disposition (60)
-
do
_ OPTIONS (24) -
do
_ rubygems _ update (12) - downcase (18)
- downcase! (9)
-
dry
_ run (12) -
dry
_ run= (12) -
dsp
_ type (12) - dummy? (12)
- dup (12)
- each (24)
-
each
_ byte (24) -
each
_ codepoint (48) -
each
_ line (24) - eigen (12)
- eigensystem (12)
-
eigenvalue
_ matrix (12) - eigenvalues (12)
-
eigenvector
_ matrix (12) -
eigenvector
_ matrix _ inv (12) - eigenvectors (12)
- encode (36)
- encode! (24)
- encoding (24)
- encoding= (12)
- eof? (12)
-
error
_ char (12) - exception (12)
-
exception
_ details (1) - exclude (12)
- exclude= (12)
-
excluded
_ from _ list? (12) - exist? (6)
- exists? (6)
- extension (60)
- extension? (12)
- extensions (24)
- extensions= (24)
- extern (12)
-
external
_ encoding (48) -
extra
_ accessor _ flags (12) -
extra
_ accessors (12) -
extra
_ rdoc _ files (12) -
extra
_ rdoc _ files= (12) - fcntl (36)
- fdatasync (12)
- fdiv (12)
- file? (6)
-
file
_ field (24) - fileboxes (12)
- fileno (11)
- files (12)
- find (12)
-
find
_ all (12) -
find
_ name (24) -
find
_ spec _ by _ name _ and _ version (12) -
finish
_ page _ dir (12) -
force
_ output (12) -
force
_ output= (12) -
force
_ update (12) - form (24)
- formatter (12)
- formatter= (12)
- generator (12)
- generator= (12)
-
get
_ instance (12) -
get
_ one _ optional _ argument (12) -
get
_ path (12) - getc (12)
- gets (24)
- grpowned? (18)
-
has
_ rdoc (12) -
has
_ rdoc= (12) -
has
_ rdoc? (12) - header (12)
- hidden (24)
-
hyperlink
_ all (12) -
hyperlink
_ all= (12) - id (12)
-
image
_ format (12) - img (12)
- include? (12)
-
include
_ line _ numbers (12) - indentation (12)
- indentation= (12)
-
infect
_ with _ assertions (1) - initialize (24)
-
inline
_ source (12) - input= (6)
- inspect (24)
- install (12)
-
install
_ update _ defaults _ str (12) -
installation
_ satisfies _ dependency? (12) -
int
_ from _ prime _ division (12) -
internal
_ encoding (48) - io (12)
- ioctl (24)
- iso8601 (12)
- l (12)
- label (12)
-
last
_ description (12) -
last
_ description= (12) -
last
_ error (12) - line (12)
-
line
_ numbers (12) -
line
_ numbers= (12) - lineno (24)
- lineno= (12)
- load (24)
-
load
_ gemspec (12) -
load
_ rakefile (12) - loaded= (12)
- loaded? (12)
-
loaded
_ from (12) -
loaded
_ from= (12) - log= (1)
- lup (12)
-
lup
_ decomposition (12) - magnitude (9)
-
main
_ page (12) -
main
_ page= (12) - markup (12)
- markup= (12)
-
marshal
_ dump (24) -
marshal
_ load (12) - merge (12)
- mkdir (12)
-
module
_ function (36) - mount (12)
- mtime (6)
-
multipart
_ form (24) - name (24)
- needed? (24)
-
new
_ cond (18) - next (12)
-
node
_ type (12) - notation (12)
- notationdecl (24)
- notationdecl? (12)
- notations (12)
- nread (12)
- offset (12)
- oid (12)
- oid= (12)
- on (108)
-
on
_ head (12) -
op
_ dir (12) -
op
_ dir= (12) -
op
_ name (12) - open (36)
-
open
_ uri _ or _ path (12) -
option
_ list (12) -
option
_ parser (12) -
option
_ parser= (12) -
option
_ string (12) - order (48)
- order! (48)
-
original
_ dir (12) - out (18)
- owned? (18)
- p (12)
- pack (21)
-
page
_ dir (12) -
page
_ dir= (12) - param (12)
- paranoid (12)
- parent (12)
- parse (12)
- parse! (12)
-
password
_ field (24) - path (12)
-
path
_ translated (12) - permute! (12)
- pid (36)
- pipe (12)
- pipe= (12)
- pipe? (6)
- pivots (12)
- pread (8)
-
previous
_ sibling (12) -
previous
_ sibling= (12) -
previous
_ sibling _ node (12) -
prime
_ division (24) -
primitive
_ convert (48) - print (12)
- printf (24)
- priority (24)
- priority= (12)
-
processing
_ instruction (12) - progress= (12)
- promiscuous (12)
- ptr (12)
- public (12)
- public= (12)
- puke (1)
-
push
_ all _ highest _ version _ gems _ on _ load _ path (12) -
push
_ gem _ version _ on _ load _ path (12) - quiet (12)
-
radio
_ group (24) -
raised
_ exception (12) -
rake
_ extension (12) -
raw
_ data (12) -
rdoc
_ include (12) - read (108)
-
read
_ nonblock (48) -
readable
_ atfer _ eof? (12) - readbyte (24)
- readchar (48)
- readline (84)
- readlines (120)
- readpartial (84)
- ready? (12)
-
record
_ location (12) -
recv
_ io (12) -
recvfrom
_ nonblock (24) - recvmsg (12)
-
remote
_ addr (12) -
remote
_ ident (12) -
remove
_ by _ name (12) -
remove
_ option (12) -
remove
_ spec (12) - reopen (24)
-
repeated
_ combination (24) -
repeated
_ permutation (24) -
report
_ on _ exception (9) -
report
_ on _ exception= (9) -
request
_ method (12) -
required
_ ruby _ version (12) -
required
_ ruby _ version= (12) -
required
_ rubygems _ version (12) -
required
_ rubygems _ version= (12) - rewind (72)
- root (12)
- root= (12)
- round (12)
-
rss
_ version (12) -
rss
_ version= (12) -
runtime
_ dependencies (12) - sanitize (12)
-
sanitize
_ path (12) -
satisfied
_ by? (12) -
satisfies
_ requirement? (12) -
save
_ exception _ mode (12) - search (12)
-
sec
_ fraction (12) -
second
_ fraction (12) - section (12)
- section= (12)
- sections (12)
-
send
_ io (12) - sendmsg (12)
- sequence (12)
-
session
_ add (12) -
session
_ cache _ mode (12) -
session
_ cache _ mode= (12) -
session
_ id (12) -
session
_ id _ context (12) -
session
_ id _ context= (12) -
session
_ reused? (12) -
set
_ comment (12) -
set
_ current _ section (12) -
set
_ debug _ output (24) -
set
_ dictionary (24) -
set
_ encoding (108) -
set
_ encoding _ by _ bom (6) -
set
_ log (1) - sfork (6)
-
show
_ all (12) -
show
_ all= (12) -
show
_ hash (12) -
show
_ lookup _ failure (12) - signal (24)
- singular? (12)
- solve (12)
-
source
_ encoding (12) -
source
_ encoding _ name (12) -
source
_ location (31) - spec (12)
- specification (12)
- start (12)
-
start
_ document (12) - starttls (12)
-
static
_ path (12) -
static
_ path= (12) - status (12)
- stdout (12)
- storbinary (24)
- storlines (24)
- succ (12)
- summarize (24)
- summary= (12)
-
summary
_ indent (12) -
summary
_ indent= (12) -
summary
_ width (12) -
summary
_ width= (12) -
sy
_ updateBase (12) -
sy
_ updateBase= (12) -
sy
_ updateFrequency (12) -
sy
_ updateFrequency= (12) -
sy
_ updatePeriod (12) -
sy
_ updatePeriod= (12) - sysread (60)
- system (12)
- system= (12)
-
tab
_ width (12) - template (12)
-
template
_ dir (12) -
template
_ dir= (12) -
text
_ field (24) - title (24)
- title= (12)
-
to
_ a (60) -
to
_ ary (24) -
to
_ binary (10) -
to
_ d (12) -
to
_ der (24) -
to
_ i (12) -
to
_ io (12) -
to
_ json (12) -
to
_ r (12) -
to
_ s (48) -
to
_ yaml (12) - transaction (12)
- u (12)
- ui (12)
- ui= (12)
- ungetc (12)
- union (19)
-
unix
_ rights (12) - unpack (12)
- update (60)
-
use
_ ui (12) - v (12)
-
v
_ inv (12) - validate (12)
- verbosity (12)
- verbosity= (12)
- version (60)
- version= (36)
-
version
_ requirement (12) -
version
_ requirement= (12) -
version
_ requirements (12) -
version
_ requirements= (12) - visibility (12)
- visibility= (12)
- wait (24)
-
wait
_ readable (12) -
wait
_ until (12) -
wait
_ while (12) - warn (12)
- webcvs (12)
- write (168)
- xmldecl (36)
- xmlschema (12)
- xpopen (24)
- yaml (12)
-
zipped
_ stream (12)
検索結果
先頭5件
-
IO
# set _ encoding _ by _ bom -> Encoding | nil (27247.0) -
BOM から IO のエンコーディングを設定します。
...BOM から IO のエンコーディングを設定します。
自身が BOM から始まる場合、BOM を読み進めて外部エンコーディングをセットし、セットしたエンコーディングを返します。
BOM が見つからなかった場合は nil を返します。
自......, "rb") do |io|
p io.set_encoding_by_bom #=> #<Encoding:UTF-8>
str = io.read
p str #=> "abc"
p str.encoding #=> #<Encoding:UTF-8>
end
File.write("nobom.txt", "abc")
File.open("nobom.txt", "rb") do |io|
p io.set_encoding_by_bom #=> nil
end
//}... -
IO
# read _ nonblock(maxlen , outbuf = nil , exception: true) -> String | Symbol | nil (27241.0) -
IO をノンブロッキングモードに設定し、 その後で read(2) システムコールにより 長さ maxlen を上限として読み込み、文字列として返します。 EAGAIN, EINTR などは Errno::EXXX 例外として呼出元に報告されます。
...
IO をノンブロッキングモードに設定し、
その後で read(2) システムコールにより
長さ maxlen を上限として読み込み、文字列として返します。
EAGAIN, EINTR などは Errno::EXXX 例外として呼出元に報告されます。
発生した例外 がErr......no::EAGAIN、 Errno::EWOULDBLOCK である場合は、
その例外オブジェクトに IO::WaitReadable が Object#extend
されます。
なお、バッファが空でない場合は、read_nonblock はバッファから読み込みます。この場合、read(2) システムコールは呼ば......れません。
このメソッドはノンブロッキングモードにする点を除いて IO#readpartial と
同じであることに注意してください。
バイナリ読み込みメソッドとして動作します。
既に EOF に達していれば EOFError が発生します。た... -
IO
# external _ encoding -> Encoding | nil (27223.0) -
IO の外部エンコーディングを返します。 外部エンコーディングが指定されていない場合は nil を返します。 ただし読み込み専用モードの場合は Encoding.default_external になります。
...
IO の外部エンコーディングを返します。
外部エンコーディングが指定されていない場合は nil を返します。
ただし読み込み専用モードの場合は Encoding.default_external になります。
//emlist[例][ruby]{
IO.write("testfile", "abcde")
File.ope......n("testfile") { |f| p f.external_encoding } # => #<Encoding:UTF-8>
//}... -
IO
# internal _ encoding -> Encoding | nil (27223.0) -
IO の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。
...
IO の内部エンコーディングを返します。
内部エンコーディングが指定されていない場合は nil を返します。
//emlist[例][ruby]{
IO.write("testfile", "abcde")
File.open("testfile") do |f|
p f.internal_encoding # => nil
f.set_encoding("ASCII-8BIT", "EUC-JP"......)
p f.internal_encoding # => #<Encoding:EUC-JP>
end
//}... -
IO
# ioctl(cmd , arg = 0) -> Integer (27223.0) -
IO に対してシステムコール ioctl を実行し、その結果を返します。 機能の詳細は ioctl(2) を参照してください。
...
IO に対してシステムコール ioctl を実行し、その結果を返します。
機能の詳細は ioctl(2) を参照してください。
@param cmd IO に対するコマンドを整数で指定します。どのようなコマンドが使えるかはプラットフォームに依存し......ます。
@param arg cmd に対する引数を指定します。整数の時にはその値を ioctl に渡します。
文字列の場合には Array#pack した構造体だとみなして渡します。
arg が nil か false の場合には 0を、true の場合には 1 を... -
IO
# cooked {|io| . . . } -> object (27208.0) -
cooked モードを有効にして指定されたブロックを評価します。
...cooked モードを有効にして指定されたブロックを評価します。
ブロック引数には self が渡されます。ブロックを評価した結果を返します。
@raise LocalJumpError ブロックを指定しなかった場合に発生します。
以下の例では、標......準入力からエコーバック付きで文字列を一行読み込みます。
require "io/console"
STDIN.cooked(&:gets)... -
IO
# ready? -> IO | false | nil (27202.0) -
ブロックせずに読み込み可能なら真を、 ブロックしてしまう可能性があるならfalseを返します。
ブロックせずに読み込み可能なら真を、
ブロックしてしまう可能性があるならfalseを返します。
判定不可能な場合は nil を返します。 -
IO
# advise(advice , offset=0 , len=0) -> nil (27201.0) -
posix_fadvise(2) を呼びだし、 ファイルへのアクセスパターンをOSに知らせます。
...posix_fadvise(2) を呼びだし、
ファイルへのアクセスパターンをOSに知らせます。
advice には以下のいずれかのシンボルを指定します。
* :normal - デフォルト
* :sequential - データは前から順にアクセスされる
* :random - データ......はランダムアクセスされる
* :willneed - データはこの直後にアクセスされる
* :dontneed - データは直後にはアクセスしない
* :noreuse - データは一度しかアクセスされない
これらの advice が具体的に何をするのかはプラットフ......osix_fadvise をサポートしていないプラットフォーム上では
何もしません。
@param advice アクセスパターンを表すシンボル
@param offset パターンを指定するデータの先頭位置
@param len パターンを指定するデータの長さ
@raise IOError... -
IO
# binmode -> self (27161.0) -
ストリームをバイナリモードにします。MSDOS などバイナリモードの存在 する OS でのみ有効です。そうでない場合このメソッドは何もしません。
...ストリームをバイナリモードにします。MSDOS などバイナリモードの存在
する OS でのみ有効です。そうでない場合このメソッドは何もしません。
バイナリモードから通常のモードに戻す方法は再オープンしかありません。......@raise Errno::EXXX モードの変更に失敗した場合に発生します。
//emlist[例][ruby]{
IO.open(IO.sysopen("testfile", "w+")) do |io|
io.binmode? # => false
io.binmode # => #<IO:fd 8>
io.binmode? # => true
end
//}
@see c:IO#io_binmode, IO#binmode?... -
IO
# readpartial(maxlen , outbuf = "") -> String (27159.0) -
IO から長さ maxlen を上限として読み込み、文字列として返します。 即座に得られるデータが存在しないときにはブロックしてデータの到着を待ちます。 即座に得られるデータが 1byte でも存在すればブロックしません。
...
IO から長さ maxlen を上限として読み込み、文字列として返します。
即座に得られるデータが存在しないときにはブロックしてデータの到着を待ちます。
即座に得られるデータが 1byte でも存在すればブロックしません。
バ......dpartial はブロックを最小限に抑えることによって、
パイプ、ソケット、端末などのストリームに対して適切に動作するよう設計されています。
readpartial がブロックするのは次の全ての条件が満たされたときだけです。
* IO......なっていない
これらの条件が満たされる場合、何らかのデータが到着するか EOF になるまで readpartial はブロックします。
readpartial の結果は以下のようになります。
(1) バッファが空でなければ、そのバッファのデータを...