種類
ライブラリ
- English (2)
- ビルトイン (128)
- benchmark (1)
- bigdecimal (5)
-
cgi
/ core (2) -
cgi
/ html (32) -
cgi
/ session (4) - continuation (1)
- coverage (1)
- csv (13)
- dbm (1)
- drb (2)
- e2mmap (7)
- etc (4)
- fiddle (3)
-
fiddle
/ import (1) - fileutils (4)
- gdbm (1)
- getoptlong (5)
-
io
/ console (1) -
irb
/ context (8) -
irb
/ ext / history (2) -
irb
/ ext / save-history (3) - json (18)
- kconv (4)
- matrix (4)
- mkmf (8)
- monitor (1)
-
net
/ ftp (3) -
net
/ http (54) -
net
/ imap (21) -
net
/ pop (1) - nkf (1)
- objspace (4)
- open-uri (8)
- openssl (58)
- optparse (23)
- pathname (2)
- prime (1)
- psych (2)
- rake (3)
-
rake
/ packagetask (1) -
rdoc
/ context (6) -
rdoc
/ markdown (1) -
rdoc
/ markup / to _ html _ crossref (1) -
rdoc
/ top _ level (1) - readline (1)
- resolv (1)
-
rexml
/ document (17) -
rexml
/ sax2listener (3) -
rexml
/ streamlistener (3) -
ripper
/ filter (1) -
ripper
/ lexer (1) -
rubygems
/ command (2) -
rubygems
/ commands / unpack _ command (1) -
rubygems
/ dependency _ installer (2) -
rubygems
/ dependency _ list (1) -
rubygems
/ gem _ path _ searcher (1) -
rubygems
/ installer (1) -
rubygems
/ package (1) -
rubygems
/ package / tar _ input (1) -
rubygems
/ remote _ fetcher (1) -
rubygems
/ security (1) -
rubygems
/ server (1) -
rubygems
/ source _ index (2) -
rubygems
/ specification (4) -
rubygems
/ user _ interaction (7) -
rubygems
/ version (4) - sdbm (1)
-
shell
/ builtin-command (1) -
shell
/ process-controller (1) - socket (9)
- stringio (1)
- syslog (1)
- tempfile (5)
- thwait (1)
- timeout (3)
- tracer (3)
- tsort (4)
- uri (1)
-
webrick
/ cgi (1) -
webrick
/ config (2) -
webrick
/ httpproxy (1) -
webrick
/ httprequest (1) -
webrick
/ httpresponse (11) -
webrick
/ httpversion (1) -
webrick
/ ssl (3) - win32ole (8)
-
yaml
/ dbm (1) - zlib (1)
クラス
-
ARGF
. class (1) - Addrinfo (1)
- Array (7)
- BasicSocket (4)
- BigDecimal (3)
-
CGI
:: Session (2) -
CGI
:: Session :: MemoryStore (1) -
CGI
:: Session :: NullStore (1) - CSV (12)
- Coverage (1)
- DBM (1)
-
DRb
:: DRbServer (1) -
Encoding
:: Converter (9) - Exception (6)
-
Fiddle
:: Function (3) - GDBM (1)
-
Gem
:: Command (2) -
Gem
:: Commands :: UnpackCommand (1) -
Gem
:: DependencyInstaller (2) -
Gem
:: DependencyList (1) -
Gem
:: FileOperations (1) -
Gem
:: GemPathSearcher (1) -
Gem
:: Installer (1) -
Gem
:: Package :: TarInput (1) -
Gem
:: RemoteFetcher (1) -
Gem
:: Server (1) -
Gem
:: SourceIndex (2) -
Gem
:: Specification (4) -
Gem
:: StreamUI (4) -
Gem
:: StreamUI :: SilentProgressReporter (1) -
Gem
:: StreamUI :: SimpleProgressReporter (1) -
Gem
:: StreamUI :: VerboseProgressReporter (1) -
Gem
:: Version (4) - GetoptLong (5)
- Hash (2)
- IO (21)
-
IRB
:: Context (12) - Matrix (3)
- Method (1)
- Module (2)
-
MonitorMixin
:: ConditionVariable (1) -
Net
:: FTP (3) -
Net
:: HTTP (43) -
Net
:: HTTPResponse (5) -
Net
:: IMAP (4) -
Net
:: IMAP :: BodyTypeBasic (4) -
Net
:: IMAP :: BodyTypeMessage (4) -
Net
:: IMAP :: BodyTypeMultipart (2) -
Net
:: IMAP :: BodyTypeText (4) -
Net
:: IMAP :: ContentDisposition (1) -
Net
:: IMAP :: ResponseCode (1) -
Net
:: IMAP :: ResponseText (1) -
Net
:: POP3 (1) - NilClass (3)
- Numeric (1)
- Object (1)
-
OpenSSL
:: ASN1 :: Constructive (1) -
OpenSSL
:: ASN1 :: ObjectId (1) -
OpenSSL
:: Config (5) -
OpenSSL
:: OCSP :: BasicResponse (3) -
OpenSSL
:: OCSP :: Request (1) -
OpenSSL
:: OCSP :: Response (1) -
OpenSSL
:: PKey :: RSA (2) -
OpenSSL
:: SSL :: SSLContext (35) -
OpenSSL
:: X509 :: ExtensionFactory (5) -
OpenSSL
:: X509 :: StoreContext (3) - OptionParser (16)
- Pathname (2)
-
Prime
:: TrialDivisionGenerator (1) - Proc (1)
-
Psych
:: Nodes :: Node (2) -
RDoc
:: Context (4) -
RDoc
:: Context :: Section (2) -
RDoc
:: Markdown (1) -
RDoc
:: Markup :: ToHtmlCrossref (1) -
RDoc
:: Options (11) -
RDoc
:: TopLevel (1) -
REXML
:: Attribute (1) -
REXML
:: DocType (1) -
REXML
:: Document (1) -
REXML
:: Element (3) -
REXML
:: Instruction (2) -
REXML
:: NotationDecl (2) -
REXML
:: Text (1) -
REXML
:: XMLDecl (5) -
Rake
:: Application (1) -
Rake
:: PackageTask (1) - Rational (1)
- Regexp (3)
-
Resolv
:: DNS (1) - Ripper (1)
-
Ripper
:: Filter (1) -
RubyVM
:: InstructionSequence (9) - SDBM (1)
-
Shell
:: Concat (1) -
Shell
:: ProcessController (1) - Socket (3)
- String (11)
- StringIO (1)
- Tempfile (5)
- Thread (3)
-
Thread
:: ConditionVariable (1) -
Thread
:: Queue (3) -
Thread
:: SizedQueue (3) - ThreadsWait (1)
- Time (9)
- Tracer (3)
- UnboundMethod (1)
- Vector (1)
-
WEBrick
:: CGI (1) -
WEBrick
:: GenericServer (2) -
WEBrick
:: HTTPProxyServer (1) -
WEBrick
:: HTTPRequest (1) -
WEBrick
:: HTTPResponse (11) -
WEBrick
:: HTTPVersion (1) - WIN32OLE (1)
-
WIN32OLE
_ EVENT (4) -
WIN32OLE
_ METHOD (1) -
WIN32OLE
_ TYPE (2) -
YAML
:: DBM (1) -
Zlib
:: Deflate (1)
モジュール
- Benchmark (1)
-
CGI
:: HtmlExtension (32) -
CGI
:: QueryExtension (2) - DRb (1)
- Enumerable (12)
- Etc (3)
- Exception2MessageMapper (7)
-
Fiddle
:: Importer (1) - FileUtils (4)
-
Gem
:: Security (1) - JSON (7)
-
JSON
:: Generator :: GeneratorMethods :: Array (1) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (1) -
JSON
:: Generator :: GeneratorMethods :: Float (1) -
JSON
:: Generator :: GeneratorMethods :: Hash (1) -
JSON
:: Generator :: GeneratorMethods :: Integer (1) -
JSON
:: Generator :: GeneratorMethods :: NilClass (1) -
JSON
:: Generator :: GeneratorMethods :: Object (1) -
JSON
:: Generator :: GeneratorMethods :: String (1) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (1) - Kconv (4)
- Kernel (33)
- NKF (1)
-
Net
:: HTTPHeader (6) - ObjectSpace (4)
-
OpenSSL
:: ASN1 (1) - OpenURI (2)
-
OpenURI
:: OpenRead (2) -
OptionParser
:: Arguable (7) - Process (1)
-
REXML
:: SAX2Listener (3) -
REXML
:: StreamListener (3) - Rake (2)
- Readline (1)
- Syslog (1)
- TSort (4)
- Timeout (2)
- URI (3)
-
WEBrick
:: Config (3)
キーワード
-
$ ! (1) -
$ ERROR _ INFO (1) -
$ ERROR _ POSITION (1) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (1) - <=> (3)
- AUTO (1)
- BigDecimal (2)
- Complex (2)
- ConditionVariable (1)
- Context (1)
- Continuation (1)
-
DEFAULT
_ OPTIONS (2) - DigestAuth (1)
- Fail (2)
- FileHandler (1)
- Float (1)
- Integer (1)
-
NEWS for Ruby 2
. 0 . 0 (1) -
NEWS for Ruby 2
. 4 . 0 (1) -
NEWS for Ruby 2
. 5 . 0 (1) - NOCONV (2)
- NUM2LONG (1)
- NUM2ULONG (1)
- NilClass (2)
- NotationDecl (1)
- Raise (2)
- Rational (1)
- Rubyの起動 (1)
- SSL (1)
- TCPServer (1)
- UNKNOWN (1)
- [] (3)
-
absolute
_ path (1) -
add
_ bindir (1) -
add
_ class _ or _ module (1) -
add
_ nonce (2) -
add
_ status (1) -
add
_ trusted _ cert (1) - alert (1)
-
alert
_ error (1) -
alert
_ warning (1) -
allocation
_ sourcefile (1) -
allocation
_ sourceline (1) - append (1)
- application (1)
- application= (1)
-
arg
_ config (1) -
asciicompat
_ encoding (2) - ask (1)
- attlistdecl (2)
- attributes (1)
-
auth
_ only (1) - autoload (2)
- autoload? (2)
-
backtrace
_ locations (2) - basic (1)
- benchmark (1)
- binread (2)
- blockquote (2)
- body (1)
-
ca
_ file (1) -
ca
_ file= (1) -
ca
_ path (1) - call (1)
-
caller
_ locations (2) - canonname (1)
- capitalize! (1)
- cause (1)
- cert (1)
- cert= (1)
-
cert
_ store (1) -
cert
_ store= (1) - chain (1)
- checkbox (2)
- chown (1)
-
chown
_ R (1) - cleanpath (1)
-
client
_ ca (1) -
client
_ cert _ cb (1) -
client
_ cert _ cb= (1) - clone (1)
- code (1)
-
cofactor
_ expansion (1) - comment (1)
- compile (2)
-
compile
_ file (1) -
compile
_ option= (1) -
completion
_ proc= (1) - component (2)
- confstr (1)
-
connect
_ nonblock (1) - console (1)
- content (1)
-
content
_ id (3) -
content
_ length (2) -
content
_ length= (2) -
content
_ range (1) -
content
_ type (3) -
content
_ type= (1) - context (1)
- context= (1)
-
continue
_ timeout (1) -
continue
_ timeout= (1) -
convertible
_ int (2) - copy (1)
- correct? (1)
-
cp
_ lr (1) - create (3)
- crl (1)
-
current
_ crl (1) - daemon (1)
- data (1)
-
default
_ event _ sources (1) -
default
_ executable (1) - delete (1)
- deq (2)
- description (3)
- detect (2)
-
dir
_ config (1) - disasm (1)
- disassemble (1)
- disconnect (1)
- disposition (4)
- doctype (2)
- done (3)
- downcase! (1)
- dump (1)
- dup (1)
- each (7)
-
each
_ cons (2) -
each
_ line (6) -
each
_ strongly _ connected _ component (4) - encode (3)
- encode! (2)
-
encode
_ www _ form _ component (1) - entity (1)
- error (1)
- error? (1)
-
eval
_ history (1) -
eval
_ history= (1) - exception (1)
- extension (5)
-
extra
_ accessors (1) -
extra
_ chain _ cert (1) - fail (1)
- fetch (4)
-
field
_ size _ limit (1) -
file
_ field (2) - filename (1)
- filename= (1)
- find (3)
-
find
_ enclosing _ module _ named (1) -
find
_ local _ symbol (1) -
find
_ module _ named (1) -
find
_ name (1) -
find
_ symbol (1) -
flush
_ sessions (1) - foreach (1)
- form (4)
- formatter (1)
- generate (1)
-
generate
_ line (1) - get (3)
- get2 (2)
-
get
_ one _ optional _ argument (1) -
get
_ option (1) -
get
_ path (1) -
get
_ response (2) -
get
_ value (1) - gm (2)
- guess (1)
- handler= (1)
- head (1)
- head2 (2)
- helpcontext (2)
- hidden (2)
-
history
_ file (1) - img (2)
-
insert
_ output (1) -
inspect
_ mode (1) - irb (1)
-
irb
/ completion (1) -
issuer
_ certificate (1) - key (1)
- key= (1)
-
laplace
_ expansion (1) -
last
_ error (1) - lex (1)
- load (3)
-
load
_ gemspec (1) -
load
_ specification (1) - local (2)
- lock (1)
- login (1)
-
long
_ name (1) -
main
_ page (1) -
marshal
_ load (1) - merge (1)
- mkcol (1)
- mktime (2)
- move (1)
-
multipart
_ form (4) - name (1)
- new (40)
-
next
_ wait (1) - none? (6)
- nonzero? (2)
- notation (1)
- notationdecl (1)
- off (1)
-
off
_ event (1) -
ole
_ show _ help (1) -
on
_ event (1) -
on
_ event _ with _ outargs (1) - one? (6)
- open (12)
-
open
_ timeout= (2) -
open
_ uri (2) -
option
_ parser (1) - optparse (1)
- order (4)
- order! (4)
-
page
_ dir (1) - param (1)
- params (1)
- parse (5)
- parse! (2)
-
parse
_ csv (1) -
password
_ field (2) - patch (2)
- pathconf (1)
-
pending
_ interrupt? (1) - permute (2)
- permute! (2)
- pop (2)
- post (2)
- post2 (2)
-
pretty
_ generate (1) -
pretty
_ unparse (1) -
primitive
_ convert (4) -
primitive
_ errinfo (1) - proppatch (1)
- public (1)
- put (1)
- put2 (2)
- quiet (1)
- rationalize (2)
-
rb
_ check _ convert _ type (1) -
rb
_ scan _ args (1) -
read
_ body (2) -
read
_ nonblock (3) -
read
_ timeout= (1) -
reason
_ phrase (1) -
reason
_ phrase= (1) - recvmsg (1)
-
recvmsg
_ nonblock (1) - release (1)
- rename (1)
-
renegotiation
_ cb (1) -
renegotiation
_ cb= (1) - request (3)
-
request
_ get (2) -
request
_ head (2) -
request
_ method (1) -
request
_ method= (1) -
request
_ post (2) -
request
_ put (2) -
request
_ uri (1) -
request
_ uri= (1) -
required
_ attribute (1) - reset (2)
- restore (1)
- rewind (1)
-
rinda
/ rinda (1) -
ruby 1
. 6 feature (1) -
ruby 1
. 8 . 2 feature (1) -
ruby 1
. 8 . 3 feature (1) -
ruby 1
. 8 . 4 feature (1) -
save
_ history (1) -
save
_ history= (1) -
send
_ request (1) - sendmsg (1)
-
sendmsg
_ nonblock (1) -
servername
_ cb (1) -
servername
_ cb= (1) -
session
_ get _ cb (1) -
session
_ id _ context (1) -
session
_ new _ cb (1) -
session
_ remove _ cb (1) -
set
_ backtrace (1) -
set
_ content _ type (1) - setquota (1)
- shift (2)
-
show
_ lookup _ failure (1) -
singleton
_ class (1) -
source
_ location (3) - spawn (4)
- specification (1)
-
ssl
_ context (1) -
ssl
_ timeout (1) -
ssl
_ timeout= (1) -
ssl
_ version (1) -
stand
_ alone? (1) - standalone (1)
- standalone= (1)
- start (1)
-
start
_ job (1) -
start
_ service (1) - status (1)
-
subject
_ certificate (1) -
subject
_ request (1) - submit (2)
- swapcase! (1)
- sysconf (1)
- sysconfdir (1)
- system (5)
- tagging (1)
- tcp (2)
-
template
_ dir (1) -
text
_ field (2) - timeout (4)
- timeout= (1)
- title (2)
-
tmp
_ dh _ callback (1) -
tmp
_ dh _ callback= (1) -
to
_ a (1) -
to
_ binary (1) -
to
_ json (9) -
to
_ r (1) -
to
_ s (1) -
to
_ yaml (1) - trace (1)
-
trace
_ object _ allocations _ start (1) -
trace
_ object _ allocations _ stop (1) - traverse (1)
-
try
_ constant (2) -
try
_ convert (5) - tsort (1)
-
unconverted
_ fields? (1) - unlock (1)
- unparse (1)
- upcase! (1)
- uptodate? (1)
-
use
_ readline (1) -
use
_ readline? (1) - utc (2)
- value (3)
- verbose (1)
- verbose= (1)
- verbose? (1)
-
verify
_ callback (1) -
verify
_ callback= (1) -
verify
_ depth (1) -
verify
_ depth= (1) -
verify
_ mode (1) -
verify
_ mode= (1) - wait (2)
- warn (1)
- webcvs (1)
-
with
_ config (2) - write (2)
- xmldecl (2)
- yaml (1)
- 制御構造 (1)
- 正規表現 (1)
検索結果
先頭5件
-
TSort
# each _ strongly _ connected _ component {|nodes| . . . } -> nil (55222.0) -
TSort#strongly_connected_components メソッドのイテレータ版です。 obj.each_strongly_connected_component は obj.strongly_connected_components.each に似ていますが、 ブロックの評価中に obj が変更された場合は予期しない結果になる ことがあります。
TSort#strongly_connected_components メソッドのイテレータ版です。
obj.each_strongly_connected_component は
obj.strongly_connected_components.each に似ていますが、
ブロックの評価中に obj が変更された場合は予期しない結果になる
ことがあります。
each_strongly_connected_component は nil を返します。
//emlist[使用例][ruby]{
require 'tsort'
class Hash
include TSort
a... -
TSort
. each _ strongly _ connected _ component(each _ node , each _ child) {|nodes| . . . } -> nil (55204.0) -
TSort.strongly_connected_components メソッドのイテレータ版です。
TSort.strongly_connected_components メソッドのイテレータ版です。
引数 each_node と each_child でグラフを表します。
@param each_node グラフ上の頂点をそれぞれ評価するcallメソッドを持つオブ
ジェクトを指定します。
@param each_child 引数で与えられた頂点の子をそれぞれ評価するcallメソッ
ドを持つオブジェクトを指定します。
//emlist[使用例][ruby]{
require 'tsort'
g = {1=>[2... -
TSort
# each _ strongly _ connected _ component -> Enumerator (54922.0) -
TSort#strongly_connected_components メソッドのイテレータ版です。 obj.each_strongly_connected_component は obj.strongly_connected_components.each に似ていますが、 ブロックの評価中に obj が変更された場合は予期しない結果になる ことがあります。
TSort#strongly_connected_components メソッドのイテレータ版です。
obj.each_strongly_connected_component は
obj.strongly_connected_components.each に似ていますが、
ブロックの評価中に obj が変更された場合は予期しない結果になる
ことがあります。
each_strongly_connected_component は nil を返します。
//emlist[使用例][ruby]{
require 'tsort'
class Hash
include TSort
a... -
TSort
. each _ strongly _ connected _ component(each _ node , each _ child) -> Enumerator (54904.0) -
TSort.strongly_connected_components メソッドのイテレータ版です。
TSort.strongly_connected_components メソッドのイテレータ版です。
引数 each_node と each_child でグラフを表します。
@param each_node グラフ上の頂点をそれぞれ評価するcallメソッドを持つオブ
ジェクトを指定します。
@param each_child 引数で与えられた頂点の子をそれぞれ評価するcallメソッ
ドを持つオブジェクトを指定します。
//emlist[使用例][ruby]{
require 'tsort'
g = {1=>[2... -
Tracer
. on -> nil (54628.0) -
トレース出力を開始します。 ブロックを与えられた場合はそのブロック内のみトレース出力を行います。
トレース出力を開始します。
ブロックを与えられた場合はそのブロック内のみトレース出力を行います。
require 'tracer'
Tracer.on
class Test
def test
b = 2
end
end
t = Test.new
t.test
@see Tracer.off -
Tracer
. on { . . . } (54328.0) -
トレース出力を開始します。 ブロックを与えられた場合はそのブロック内のみトレース出力を行います。
トレース出力を開始します。
ブロックを与えられた場合はそのブロック内のみトレース出力を行います。
require 'tracer'
Tracer.on
class Test
def test
b = 2
end
end
t = Test.new
t.test
@see Tracer.off -
OpenSSL
:: SSL :: SSLContext # session _ id _ context -> String | nil (45922.0) -
セッション ID コンテキスト文字列を返します。
セッション ID コンテキスト文字列を返します。
設定されていない場合は nil を返します。
@see OpenSSL::SSL::Session,
OpenSSL::SSL::SSLContext#session_id_context= -
JSON
:: Generator :: GeneratorMethods :: NilClass # to _ json(state _ or _ hash = nil) -> String (36622.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
"null" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
nil.to_json # => "null"
//} -
Gem
:: Command # get _ one _ optional _ argument -> String (36619.0) -
コマンドラインからオプショナルな引数を取得して返します。
コマンドラインからオプショナルな引数を取得して返します。
@return 一つ以上、指定した場合は最初の値を返します。一つも指定していない場合は nil を返します。 -
Socket
# connect _ nonblock(server _ sockaddr) -> 0 (36619.0) -
ソケットをノンブロッキングモードに設定した後、 connect(2) を呼び出します。
ソケットをノンブロッキングモードに設定した後、
connect(2) を呼び出します。
引数、返り値は Socket#connect と同じです。
connect が EINPROGRESS エラーを報告した場合、その例外(Errno::EINPROGRESS)
には IO::WaitWritable が Object#extend されます。
これを connect_nonblock をリトライするために使うことができます。
# Pull down Google's web page
require 'socket'
include Socket::Constants
... -
Continuation (36019.0)
-
継続を表すクラスです。
継続を表すクラスです。
Kernel.#callcc { |cont| ... } の呼び出し
は、直前の状態(ローカル変数の定義、スタックフレーム)を cont に記憶
してブロックを実行します。cont は、Continuation クラスのインスタ
ンスで、Continuation#call メソッドを実行するこ
とでいつでも記憶した状態を継続することができます。
C 言語の setjmp()/longjmp() がわかる人は
setjmp() == callcc {|c| }
longjmp() == c.call
と考えれば、わかりやすいかも知れません(ただし、callc... -
Thread
:: ConditionVariable (36019.0) -
スレッドの同期機構の一つである状態変数を実現するクラスです。
スレッドの同期機構の一つである状態変数を実現するクラスです。
以下も ConditionVariable を理解するのに参考になります。
https://ruby-doc.com/docs/ProgrammingRuby/html/tut_threads.html#UF
=== Condition Variable とは
あるスレッド A が排他領域で動いていたとします。スレッド A は現在空いていない
リソースが必要になったので空くまで待つことにしたとします。これはうまくいきません。
なぜなら、スレッド A は排他領域で動いているわけですから、他のスレッドは動くことが
できません。リ... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (28519.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol (28219.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol (27919.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
CGI
:: HtmlExtension # image _ button(src = "" , name = nil , alt = nil) -> String (27907.0) -
タイプが image の input 要素を生成します。
タイプが image の input 要素を生成します。
@param src src 属性の値を指定します。
@param name name 属性の値を指定します。
@param alt alt 属性の値を指定します。
例:
image_button("url")
# <INPUT TYPE="image" SRC="url">
image_button("url", "name", "string")
# <INPUT TYPE="image" SRC="url" NAME="name" ALT="string"> -
CGI
:: HtmlExtension # radio _ button(name = "" , value = nil , checked = nil) -> String (27907.0) -
タイプが radio である input 要素を生成します。
タイプが radio である input 要素を生成します。
@param name name 属性の値を指定します。
@param value value 属性の値を指定します。
@param checked 真ならば checked 属性を設定します。
例:
radio_button("name", "value")
# <INPUT TYPE="radio" NAME="name" VALUE="value">
radio_button("name", "value", true)
# <INPUT TYPE="radio" NAME="name" ... -
Exception
. exception(error _ message = nil) -> Exception (27907.0) -
例外オブジェクトを生成して返します。
例外オブジェクトを生成して返します。
@param error_message エラーメッセージを表す文字列を指定します。このメッセージは
属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。
//emlist[例][ruby]{
e = Exception.new("some message")
p e # => #<Exception: some message>
p e.message # => "some message"
//}
//emlist[例][ruby]{
e = E... -
RDoc
:: Options # option _ parser -> OptionParser | nil (27904.0) -
コマンドライン引数の解析のための OptionParser オブジェクトを返し ます。
コマンドライン引数の解析のための OptionParser オブジェクトを返し
ます。 -
WEBrick
:: HTTPResponse # content _ length -> Integer | nil (27742.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実際のサイズとこの値が同じかどうかの検証は行われません。
: body が IO オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダはレスポンスに含まれず、IO から全てを読み込ん
でそれをエンティティボ... -
WEBrick
:: HTTPResponse # reason _ phrase -> String | nil (27700.0) -
HTTP のレスポンスの最初の行の reason phrase を返します。 この値が nil の場合 reason phrase は status から生成されます。 デフォルトは nil です。
HTTP のレスポンスの最初の行の reason phrase を返します。
この値が nil の場合 reason phrase は status から生成されます。
デフォルトは nil です。 -
OptionParser
:: Arguable # options -> OptionParser (27658.0) -
自身をパースするための OptionParser オブジェクトを返します。 初回呼び出し時に自動的に生成されます。 この OptionParser#default_argv には self がセットされています。
自身をパースするための OptionParser オブジェクトを返します。
初回呼び出し時に自動的に生成されます。
この OptionParser#default_argv には self がセットされています。
ブロックを与えた場合は、OptionParser を引数としてブロックを実行します。
ブロックの実行結果を返します。
ブロックの実行途中で OptionParser::ParseError
が発生した場合は、全て rescue し、エラーメッセージを出力し、
nil を返します。
//emlist[][ruby]{
require 'optparse'
o = nil
ARG... -
OptionParser
:: Arguable # options {|opt| . . . } -> object | nil (27658.0) -
自身をパースするための OptionParser オブジェクトを返します。 初回呼び出し時に自動的に生成されます。 この OptionParser#default_argv には self がセットされています。
自身をパースするための OptionParser オブジェクトを返します。
初回呼び出し時に自動的に生成されます。
この OptionParser#default_argv には self がセットされています。
ブロックを与えた場合は、OptionParser を引数としてブロックを実行します。
ブロックの実行結果を返します。
ブロックの実行途中で OptionParser::ParseError
が発生した場合は、全て rescue し、エラーメッセージを出力し、
nil を返します。
//emlist[][ruby]{
require 'optparse'
o = nil
ARG... -
NilClass
# rationalize -> Rational (27655.0) -
0/1 を返します。
0/1 を返します。
@param eps 許容する誤差
引数 eps は常に無視されます。
//emlist[例][ruby]{
nil.rationalize # => (0/1)
nil.rationalize(100) # => (0/1)
nil.rationalize(0.1) # => (0/1)
//} -
NilClass
# rationalize(eps) -> Rational (27655.0) -
0/1 を返します。
0/1 を返します。
@param eps 許容する誤差
引数 eps は常に無視されます。
//emlist[例][ruby]{
nil.rationalize # => (0/1)
nil.rationalize(100) # => (0/1)
nil.rationalize(0.1) # => (0/1)
//} -
RubyVM
:: InstructionSequence . compile _ option=(options) (27637.0) -
命令シーケンスのコンパイル時のデフォルトの最適化オプションを引数 options で指定します。
命令シーケンスのコンパイル時のデフォルトの最適化オプションを引数
options で指定します。
@param options コンパイル時の最適化オプションを true、false、nil、
Hash のいずれかで指定します。true を指定した場合は
全てのオプションを有効にします。false を指定した場合は全
てのオプションを無効にします。nil を指定した場合はいずれ
のオプションも変更しません。また、Hash を指定した
場合は以... -
OpenSSL
:: SSL :: SSLContext # flush _ sessions(time=nil) -> self (27622.0) -
自身が保持しているセッションキャッシュを破棄します。
自身が保持しているセッションキャッシュを破棄します。
time に nil を渡すと現在時刻で期限切れになっている
キャッシュを破棄します。
time に Time オブジェクトを渡すと、その
時刻で時間切れになるキャッシュを破棄します。
@param time キャッシュ破棄の基準時刻
@see OpenSSL::SSL::SSLContext#session_cache_mode= -
OpenSSL
:: SSL :: SSLContext # session _ get _ cb -> Proc | nil (27622.0) -
セッションキャッシュを探索し、内部のキャッシュテーブルには 見付からなかった場合に呼び出されるコールバックを返します。
セッションキャッシュを探索し、内部のキャッシュテーブルには
見付からなかった場合に呼び出されるコールバックを返します。
設定されていないときは nil を返します。
@see OpenSSL::SSL::SSLContext#session_get_cb= -
OpenSSL
:: SSL :: SSLContext # session _ new _ cb -> Proc | nil (27622.0) -
セッションが生成されたときに呼び出されるコールバックを返します。
セッションが生成されたときに呼び出されるコールバックを返します。
設定されていないときは nil を返します。
@see OpenSSL::SSL::SSLContext#session_new_cb= -
OpenSSL
:: SSL :: SSLContext # session _ remove _ cb -> Proc | nil (27622.0) -
セッションが内部キャッシュから破棄されたときに呼び出される コールバックを返します。
セッションが内部キャッシュから破棄されたときに呼び出される
コールバックを返します。
設定されていないときは nil を返します。
@see OpenSSL::SSL::SSLContext#session_remove_cb= -
REXML
:: Instruction # content -> String | nil (27622.0) -
XML 処理命令の内容を返します。
XML 処理命令の内容を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<?foobar?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-stylesheet"
doc[2].content... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol (27619.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
CGI
:: HtmlExtension # caption(align = nil) -> String (27607.0) -
caption 要素を生成します。
caption 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。
@param align 配置を文字列で指定します。(top, bottom, left right が指定可能です)
属性をハッシュで指定することもできます。
例:
caption("left") { "Capital Cities" }
# => <CAPTION ALIGN=\"left\">Capital Cities</CAPTION> -
CGI
:: HtmlExtension # caption(align = nil) { . . . } -> String (27607.0) -
caption 要素を生成します。
caption 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。
@param align 配置を文字列で指定します。(top, bottom, left right が指定可能です)
属性をハッシュで指定することもできます。
例:
caption("left") { "Capital Cities" }
# => <CAPTION ALIGN=\"left\">Capital Cities</CAPTION> -
JSON
:: Generator :: GeneratorMethods :: Array # to _ json(state _ or _ hash = nil) -> String (27604.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
[1, 2, 3].to_json # => "[1,2,3]"
//} -
JSON
:: Generator :: GeneratorMethods :: FalseClass # to _ json(state _ or _ hash = nil) -> String (27604.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
"false" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
false.to_json # => "false"
//} -
JSON
:: Generator :: GeneratorMethods :: Float # to _ json(state _ or _ hash = nil) -> String (27604.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
(1.0).to_json # => "1.0"
//} -
JSON
:: Generator :: GeneratorMethods :: Hash # to _ json(state _ or _ hash = nil) -> String (27604.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
person = { "name" => "tanaka", "age" => 19 }
person.to_json # ... -
JSON
:: Generator :: GeneratorMethods :: Integer # to _ json(state _ or _ hash = nil) -> String (27604.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
10.to_json # => "10"
//} -
JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String (27604.0) -
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
このメソッドはあるオブジェクトに to_json メソッドが定義されていない場合に使用する
フォールバックのためのメソッドです。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json(state _ or _ hash = nil) -> String (27604.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
自身のエンコードは UTF-8 であるべきです。
"\u????" のように UTF-16 ビッグエンディアンでエンコードされた文字列を返すことがあります。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]... -
JSON
:: Generator :: GeneratorMethods :: TrueClass # to _ json(state _ or _ hash = nil) -> String (27604.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
"true" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
true.to_json # => "true"
//} -
Kconv
:: NOCONV -> nil (27604.0) -
変換されないことを表します。 出力エンコーディングの指定にのみ用います。
変換されないことを表します。
出力エンコーディングの指定にのみ用います。 -
OpenSSL
:: OCSP :: BasicResponse # add _ nonce(val=nil) -> self (27604.0) -
BasicResponse に nonce を追加します。
BasicResponse に nonce を追加します。
引数を省略すると、ランダムな nonce を生成し利用します。
通常はこのメソッドを使わず OpenSSL::OCSP::BasicResponse#copy_nonce を
用います。
@param val 追加する nonce の値(文字列) -
OpenSSL
:: SSL :: SSLContext # options -> Integer | nil (27604.0) -
設定されているオプションフラグを返します。
設定されているオプションフラグを返します。
@see OpenSSL::SSL::SSLContext#options= -
OpenSSL
:: SSL :: SSLContext # renegotiation _ cb -> nil | Proc (27604.0) -
ハンドシェイク開始時に呼び出されるコールバックを得ます。
ハンドシェイク開始時に呼び出されるコールバックを得ます。
@see OpenSSL::SSL::SSLContext#renegotiation_cb= -
WEBrick
:: HTTPResponse # content _ type -> String | nil (27604.0) -
Content-Type ヘッダの値を返します。
Content-Type ヘッダの値を返します。 -
WEBrick
:: HTTPResponse # content _ length=(len) (27442.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実際のサイズとこの値が同じかどうかの検証は行われません。
: body が IO オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダはレスポンスに含まれず、IO から全てを読み込ん
でそれをエンティティボ... -
WEBrick
:: HTTPResponse # reason _ phrase=(val) (27397.0) -
HTTP のレスポンスの最初の行の reason phrase をセットします。 この値が nil の場合 reason phrase は status から生成されます。 デフォルトは nil です。
HTTP のレスポンスの最初の行の reason phrase をセットします。
この値が nil の場合 reason phrase は status から生成されます。
デフォルトは nil です。
@param val reason phrase を表す文字列を指定します。
require 'webrick'
res = WEBrick::HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.status = 404
p res.reason_phrase #=> "Not Found" -
Rake
:: Application # options -> OpenStruct (27355.0) -
コマンドラインで与えられたアプリケーションのオプションを返します。
コマンドラインで与えられたアプリケーションのオプションを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.options # => #<OpenStruct always_multitask=false, backtrace=false, build_all=false, dryrun=false, ignore_deprecate=false, ignore_system=false, job_stats=... -
OpenSSL
:: SSL :: SSLContext # renegotiation _ cb=(cb) (27337.0) -
@todo
@todo
ハンドシェイク開始時に呼び出されるコールバックを設定します。
コールバックには OpenSSL::SSL::SSLSocket オブジェクトが
渡されます。
このコールバック内で何らかの例外が生じた場合には
以降のSSLの処理を停止します。
再ネゴシエーションのたびにこのコールバックが呼び出されるため、
何らかの理由で再ネゴシエーションを禁止したい場合などに利用できます。
nil を渡すとコールバックは無効になります。
以下の例は再ネゴシエーションを一切禁止します。
num_handshakes = 0
ctx.renegotiation_cb = lambd... -
OptionParser
:: Arguable # options=(opt) (27337.0) -
自身をパースするための OptionParser オブジェクトをセットします。
自身をパースするための OptionParser オブジェクトをセットします。
@param opt 自身をパースする OptionParser 、あるいは nil か false を指定します。
nil か false である場合、自身の options= メソッドと options メソッドを
undef します。 -
CGI
:: HtmlExtension # image _ button(attributes) -> String (27307.0) -
タイプが image の input 要素を生成します。
タイプが image の input 要素を生成します。
@param attributes 属性をハッシュで指定します。
例:
image_button({ "SRC" => "url", "ALT" => "string" })
# <INPUT TYPE="image" SRC="url" ALT="string"> -
CGI
:: HtmlExtension # radio _ button(attributes) -> String (27307.0) -
タイプが radio である input 要素を生成します。
タイプが radio である input 要素を生成します。
@param attributes 属性をハッシュで指定します。
例:
radio_button({ "NAME" => "name", "VALUE" => "value", "ID" => "foo" })
# <INPUT TYPE="radio" NAME="name" VALUE="value" ID="foo"> -
MonitorMixin
:: ConditionVariable # wait(timeout = nil) -> bool (27304.0) -
モニタのロックを開放し、現在のスレッドを停止します。
モニタのロックを開放し、現在のスレッドを停止します。
これを呼ぶスレッドはモニタのロックを保持している必要があります。
MonitorMixin::ConditionVariable#signal や
MonitorMixin::ConditionVariable#broadcast
で起こされるまでスレッドは停止し続けます。
timeout を与えた場合は最大 timeout 秒まで停止した後にスレッドを
再開します。
実行を再開したスレッドはモニタのロックを保持した状態になります。
これによって危険領域(critical section)上で動作している
スレッドはただ一つになり... -
JSON
:: Ext :: Generator :: GeneratorMethods :: NilClass (27001.0) -
Alias of JSON::Generator::GeneratorMethods::NilClass
Alias of JSON::Generator::GeneratorMethods::NilClass -
JSON
:: Generator :: GeneratorMethods :: NilClass (27001.0) -
NilClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
NilClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。 -
Kernel
. # caller _ locations(start = 1 , length = nil) -> [Thread :: Backtrace :: Location] | nil (19276.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@param range 取得したいフレームの範囲を示す Range オブジェクトを指定します。
//emlist[例][ruby]{
def test1(start, length)
locations = caller_locations(start, length)
p locations
... -
StringIO
# read _ nonblock(maxlen , outbuf = nil , exception: true) -> String | nil (19273.0) -
StringIO#readに似ていますが、 exception オプションに false を指定すると EOFError を発生させず nil を返します。
StringIO#readに似ていますが、 exception オプションに false を指定すると EOFError を発生させず nil を返します。
@param len 読み込みたい長さを整数で指定します。StringIO#read と同じです。
@param outbuf 読み込んだ文字列を出力するバッファを文字列で指定します。指定した文字列オブジェクトが
あらかじめ length 長の領域であれば、余計なメモリの割当てが行われません。指定した文字列の
長さが length と異なる場合、その文字列は一旦 length ... -
Kernel
. # Rational(x , y = 1 , exception: true) -> Rational | nil (19240.0) -
引数を有理数(Rational)に変換した結果を返します。
引数を有理数(Rational)に変換した結果を返します。
@param x 変換対象のオブジェクトです。
@param y 変換対象のオブジェクトです。省略した場合は x だけを用いて
Rational オブジェクトを作成します。
@param exception false を指定すると、変換できなかった場合、
例外を発生する代わりに nil を返します。
@raise ArgumentError 変換できないオブジェクトを指定した場合に発生します。
引数 x、y の両方を指定した場合、x/y した Rational オブジェ... -
Kernel
# try _ constant(const , headers = nil , opt = "") -> Integer | nil (19231.0) -
定数 const がシステムに存在するかどうか検査します。 Kernel#have_const を使ってください。
定数 const がシステムに存在するかどうか検査します。
Kernel#have_const を使ってください。
@param const C 言語の定数名を指定します。
@param headers 追加のヘッダファイルを指定します。
@param opt コンパイラに渡すオプションを指定します。
$CFLAGS もコンパイラには渡されます。
@return 定数 const がシステムに存在する場合はその値を返します。
定数 const がシステムに存在しない場合は nil を返します。 -
Kernel
# try _ constant(const , headers = nil , opt = "") { . . . } -> Integer | nil (19231.0) -
定数 const がシステムに存在するかどうか検査します。 Kernel#have_const を使ってください。
定数 const がシステムに存在するかどうか検査します。
Kernel#have_const を使ってください。
@param const C 言語の定数名を指定します。
@param headers 追加のヘッダファイルを指定します。
@param opt コンパイラに渡すオプションを指定します。
$CFLAGS もコンパイラには渡されます。
@return 定数 const がシステムに存在する場合はその値を返します。
定数 const がシステムに存在しない場合は nil を返します。 -
Thread
# backtrace _ locations(start = 0 , length = nil) -> [Thread :: Backtrace :: Location] | nil (19228.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
スレッドの現在のバックトレースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@param range 取得したいフレームの範囲を示す Range オブジェクトを指定します。
Kernel.#caller_locations と似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]... -
ARGF
. class # read _ nonblock(maxlen , outbuf = nil , exception: true) -> String | Symbol | nil (19225.0) -
処理中のファイルからノンブロッキングモードで最大 maxlen バイト読み込みます。 詳しくは IO#read_nonblock を参照してください。
処理中のファイルからノンブロッキングモードで最大 maxlen バイト読み込みます。
詳しくは IO#read_nonblock を参照してください。
ARGF.class#read などとは違って複数ファイルを同時に読み込むことはありません。
@param maxlen 読み込む長さの上限を整数で指定します。
@param outbuf 読み込んだデータを格納する String オブジェクトを指定します。
@param exception 読み込み時に Errno::EAGAIN、
Errno::EWOULDBLOCK が発生する代わりに
... -
IO
# read _ nonblock(maxlen , outbuf = nil , exception: true) -> String | Symbol | nil (19225.0) -
IO をノンブロッキングモードに設定し、 その後で read(2) システムコールにより 長さ maxlen を上限として読み込み、文字列として返します。 EAGAIN, EINTR などは Errno::EXXX 例外として呼出元に報告されます。
IO をノンブロッキングモードに設定し、
その後で read(2) システムコールにより
長さ maxlen を上限として読み込み、文字列として返します。
EAGAIN, EINTR などは Errno::EXXX 例外として呼出元に報告されます。
発生した例外 がErrno::EAGAIN、 Errno::EWOULDBLOCK である場合は、
その例外オブジェクトに IO::WaitReadable が Object#extend
されます。
なお、バッファが空でない場合は、read_nonblock はバッファから読み込みます。この場合、read(2) システムコールは呼ばれません... -
Matrix
# cofactor _ expansion(row: nil , column: nil) -> object | Integer | Rational | Float (19213.0) -
row 行、もしくは column 列に関するラプラス展開をする。
row 行、もしくは column 列に関するラプラス展開をする。
通常の行列に対してはこれは単に固有値を計算するだけです。かわりにMatrix#determinant を
利用すべきです。
変則的な形状の行列に対してはそれ以上の意味を持ちます。例えば
row行/column列が行列やベクトルである場合には
//emlist[例][ruby]{
require 'matrix'
# Matrix[[7,6], [3,9]].laplace_expansion(column: 1) # => 45
Matrix[[Vector[1, 0], Vector[0, 1]], [2, 3]].... -
Matrix
# laplace _ expansion(row: nil , column: nil) -> object | Integer | Rational | Float (19213.0) -
row 行、もしくは column 列に関するラプラス展開をする。
row 行、もしくは column 列に関するラプラス展開をする。
通常の行列に対してはこれは単に固有値を計算するだけです。かわりにMatrix#determinant を
利用すべきです。
変則的な形状の行列に対してはそれ以上の意味を持ちます。例えば
row行/column列が行列やベクトルである場合には
//emlist[例][ruby]{
require 'matrix'
# Matrix[[7,6], [3,9]].laplace_expansion(column: 1) # => 45
Matrix[[Vector[1, 0], Vector[0, 1]], [2, 3]].... -
BasicSocket
# recvmsg _ nonblock(maxmesglen=nil , flags=0 , maxcontrollen=nil , opts={}) -> [String , Addrinfo , Integer , *Socket :: AncillaryData] (19207.0) -
recvmsg(2) を用いてノンブロッキング方式でメッセージを受け取ります。
recvmsg(2) を用いてノンブロッキング方式でメッセージを受け取ります。
ブロッキングの有無以外は BasicSocket#recvmsg と同じです。
詳しくはそちらを参照してください。
@param maxmesglen 受け取るメッセージの最大長
@param flags フラグ
@param maxcontrollen 受け取る補助データの最大長
@param opts ハッシュオプション -
Kernel
# with _ config(config , default = nil) {|config , default| . . . } -> bool | String (19207.0) -
configure のオプションを検査します。
configure のオプションを検査します。
configure のオプションに --with-<config> が指定された場合は真を返しま
す。--without-<config> が指定された場合は偽を返します。どちらでもない場
合は default を返します。
これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。
@param config configure のオプションの名前を指定します。
@param default デフォルト値を返します。
例
require 'mkmf'
if with_config("debug")
$defs... -
Net
:: HTTP . get _ response(host , path = nil , port = nil) -> Net :: HTTPResponse (19207.0) -
指定した対象に GET リクエストを送り、そのレスポンスを Net::HTTPResponse として返します。
指定した対象に GET リクエストを送り、そのレスポンスを
Net::HTTPResponse として返します。
対象の指定方法は URI で指定するか、
(host, path, port) で指定するかのいずれかです。
@param uri データの取得対象を URI で指定します。
@param host 接続先のホストを文字列で指定します。
@param path データの存在するパスを文字列で指定します。
@param port 接続するポートを整数で指定します。
@see Net::HTTP#get -
Net
:: IMAP :: BodyTypeBasic # disposition -> Net :: IMAP :: ContentDisposition | nil (19204.0) -
Content-Dispotition の値を返します。
Content-Dispotition の値を返します。
Net::IMAP::ContentDisposition オブジェクトを返します。
@see 1806, 2183 -
Net
:: IMAP :: BodyTypeMessage # disposition -> Net :: IMAP :: ContentDisposition | nil (19204.0) -
Content-Dispotition の値を返します。
Content-Dispotition の値を返します。
Net::IMAP::ContentDisposition オブジェクトを返します。
@see 1806, 2183 -
Net
:: IMAP :: BodyTypeMultipart # disposition -> Net :: IMAP :: ContentDisposition | nil (19204.0) -
Content-Dispotition の値を返します。
Content-Dispotition の値を返します。
Net::IMAP::ContentDisposition オブジェクトを返します。
@see 1806, 2183 -
Net
:: IMAP :: BodyTypeText # disposition -> Net :: IMAP :: ContentDisposition | nil (19204.0) -
Content-Dispotition の値を返します。
Content-Dispotition の値を返します。
Net::IMAP::ContentDisposition オブジェクトを返します。
@see 1806, 2183 -
Kernel
. # caller _ locations(range) -> [Thread :: Backtrace :: Location] | nil (18976.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@param range 取得したいフレームの範囲を示す Range オブジェクトを指定します。
//emlist[例][ruby]{
def test1(start, length)
locations = caller_locations(start, length)
p locations
... -
VALUE rb
_ check _ convert _ type(VALUE val , int type , const char *tname , const char *method) (18949.0) -
val.method を実行してクラス tname のインスタンスを返します。 val がメソッド method を持たなければ nil を返します。
val.method を実行してクラス tname のインスタンスを返します。
val がメソッド method を持たなければ nil を返します。
type は、T_ARRAY, T_STRING などの構造体を表す ID です。
method の結果の型が type でなければ例外 TypeError が発生します。 -
Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil (18928.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
スレッドの現在のバックトレースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@param range 取得したいフレームの範囲を示す Range オブジェクトを指定します。
Kernel.#caller_locations と似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]... -
Kernel
# arg _ config(config , default) { . . . } -> object | String | true | nil (18922.0) -
configure オプション --config の値を返します。
configure オプション --config の値を返します。
@param config オプションを文字列で指定します。
@param default 引数 config で指定したオプションのデフォルト値を指定します。
@return オプションが指定されてた場合は true を、指定されなかった場合は
nil を返します。
引数 default、あるいはブロックを指定すると、オプションが指定さ
れていない場合に引数 default の値かブロックの評価結果を返します
(両方指定した場合はブロックが優先されます)... -
OpenSSL
:: OCSP :: Request # add _ nonce(nonce = nil) -> self (18922.0) -
Request オブジェクトに nonce を追加します。
Request オブジェクトに nonce を追加します。
nonce とは、リプレイ攻撃を防止するために設定する乱数です。
@param nonce 設定するnonce文字列。nilの場合は適当な乱数を自動で設定します -
REXML
:: DocType # notation(name) -> REXML :: NotationDecl | nil (18922.0) -
DTD に含まれている記法宣言 (REXML::NotationDecl) で name という名前を持つものを返します。
DTD に含まれている記法宣言 (REXML::NotationDecl) で
name という名前を持つものを返します。
name という名前を持つ記法宣言が存在しない場合は nil を返します。
@param name 検索する記法名 -
Kernel
# convertible _ int(type , headers = nil , opts = nil) (18913.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) { . . . } (18913.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
Kernel
# dir _ config(target , idefault = nil , ldefault = nil) -> [String , String] (18907.0) -
configure オプション --with-TARGET-dir, --with-TARGET-include, --with-TARGET-lib をユーザが extconf.rb に指定できるようにします。
configure オプション
--with-TARGET-dir,
--with-TARGET-include,
--with-TARGET-lib
をユーザが extconf.rb に指定できるようにします。
--with-TARGET-dir オプションは
システム標準ではない、
ヘッダファイルやライブラリがあるディレクトリをまとめて指定するために使います。
ユーザが extconf.rb に --with-TARGET-dir=PATH を指定したときは
$CFLAGS に "-IPATH/include" を、
$LDFLAGS に "-LPATH/lib" を、
それぞれ追加し... -
Kernel
# with _ config(config , default = nil) -> bool | String (18907.0) -
configure のオプションを検査します。
configure のオプションを検査します。
configure のオプションに --with-<config> が指定された場合は真を返しま
す。--without-<config> が指定された場合は偽を返します。どちらでもない場
合は default を返します。
これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。
@param config configure のオプションの名前を指定します。
@param default デフォルト値を返します。
例
require 'mkmf'
if with_config("debug")
$defs... -
Process
. # daemon(nochdir = nil , noclose = nil) -> 0 (18907.0) -
プロセスから制御端末を切り離し、 バックグラウンドにまわってデーモンとして動作させます。
プロセスから制御端末を切り離し、
バックグラウンドにまわってデーモンとして動作させます。
カレントディレクトリを / に移動します。
ただし nochdir に真を指定したときにはこの動作は抑制され、
カレントディレクトリは移動しません。
標準入力・標準出力・標準エラー出力を /dev/null にリダイレクトします。
ただし noclose に真を指定したときにはこの動作は抑制され、
リダイレクトは行なわれません。
@param nochdir true を指定した場合、カレントディレクトリを移動しません。
@param noclose true を指定した場合、標準入力・標準出... -
BasicSocket
# sendmsg _ nonblock(mesg , flags=0 , dest _ sockaddr=nil , *controls) -> Integer (18904.0) -
sendmsg(2) を用いてノンブロッキング方式でメッセージを送ります。
sendmsg(2) を用いてノンブロッキング方式でメッセージを送ります。
詳しくは BasicSocket#sendmsg を見てください。
@return 送ったバイト数
@param mesg メッセージ文字列
@param flags フラグ(Socket::MSG_* という定数の bitwise OR を取ったもの)
@param dest_sockaddr 通信先のアドレス
@param controls 補助データの配列
@see BasicSocket#sendmsg -
Gem
:: SourceIndex # specification(full _ name) -> Gem :: Specification | nil (18904.0) -
指定された名前の Gem::Specification オブジェクトを返します。
指定された名前の Gem::Specification オブジェクトを返します。
@param full_name Gem のフルネームを指定します。 -
Gem
:: SourceIndex . load _ specification(file _ name) -> Gem :: Specification | nil (18904.0) -
与えられたファイル名から Ruby スクリプト形式の gemspec をロードして Gem::Specification のインスタンスを返します。
与えられたファイル名から Ruby スクリプト形式の gemspec をロードして
Gem::Specification のインスタンスを返します。
@param file_name ファイル名を指定します。
@raise SignalException gemspec をロードしているときに発生します。
@raise SystemExit gemspec をロードしているときに発生します。 -
Net
:: HTTP # options(path , initheader = nil) -> Net :: HTTPResponse (18904.0) -
サーバの path に OPTIONS リクエストを ヘッダが initheader として送り、 レスポンスを Net::HTTPResponse のオブジェクト で返します。
サーバの path に OPTIONS リクエストを
ヘッダが initheader として送り、
レスポンスを Net::HTTPResponse のオブジェクト
で返します。
@param path リクエストを送るパスを文字列で与えます。
@param initheader リクエストのヘッダを「文字列=>文字列」の
ハッシュで与えます。
@see Net::HTTP::Options -
WEBrick
:: GenericServer # ssl _ context -> OpenSSL :: SSL :: SSLContext | nil (18904.0) -
サーバが保持する OpenSSL::SSL::SSLContext オブジェクトを返します。
サーバが保持する OpenSSL::SSL::SSLContext オブジェクトを返します。 -
Numeric
# nonzero? -> self | nil (18706.0) -
自身がゼロの時 nil を返し、非ゼロの時 self を返します。
自身がゼロの時 nil を返し、非ゼロの時 self を返します。
//emlist[例][ruby]{
p 10.nonzero? #=> 10
p 0.nonzero? #=> nil
p 0.0.nonzero? #=> nil
p Rational(0, 2).nonzero? #=> nil
//}
非ゼロの時に self を返すため、自身が 0 の時に他の処理をさせたい場合に以
下のように記述する事もできます。
//emlist[例][ruby]{
a = %w( z Bb bB bb BB a... -
String
. try _ convert(obj) -> String | nil (18688.0) -
obj を String に変換しようと試みます。変換には Object#to_str メソッ ドが使われます。変換後の文字列を返すか、何らかの理由により変換できなかっ た場合は nil が返されます。
obj を String に変換しようと試みます。変換には Object#to_str メソッ
ドが使われます。変換後の文字列を返すか、何らかの理由により変換できなかっ
た場合は nil が返されます。
@param obj 変換する任意のオブジェクト
@return 変換後の文字列または nil
//emlist[例][ruby]{
String.try_convert("str") # => "str"
String.try_convert(/re/) # => nil
//} -
WIN32OLE
_ EVENT # on _ event(event = nil) {|*args| . . . } -> () (18679.0) -
イベント通知を受けるブロックを登録します。
イベント通知を受けるブロックを登録します。
引数にはイベントのメソッド名を指定します。引数を省略した場合は、すべて
のイベントを対象とするブロックの登録となります。
@param event イベント名を文字列かシンボルで指定します。イベント名は大文
字小文字を区別します。省略時にはすべてのイベントが対象となります。
@param args サーバがイベント通知時に指定した引数です。
eventパラメータを省略した場合、第1引数にはイベントのメソッ
ド名が文字列で与えられます。引数の変更が必要な場合は、
... -
BigDecimal
# nonzero? -> self | nil (18670.0) -
self が 0 以外のときに self を返します。0 のときに nil を返します。
self が 0 以外のときに self を返します。0 のときに nil を返します。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("0").nonzero? # => nil
BigDecimal("1").nonzero? # => 0.1e1
//} -
IO
. try _ convert(obj) -> IO | nil (18670.0) -
obj を to_io メソッドによって IO オブジェクトに変換します。 変換できなかった場合は nil を返します。
obj を to_io メソッドによって IO オブジェクトに変換します。
変換できなかった場合は nil を返します。
IO.try_convert(STDOUT) # => STDOUT
IO.try_convert("STDOUT") # => nil -
WIN32OLE
_ EVENT # on _ event _ with _ outargs(event = nil) {|*args| . . . } -> () (18643.0) -
イベント通知を受けて結果を呼び出し元へ返すブロックを登録します。
イベント通知を受けて結果を呼び出し元へ返すブロックを登録します。
引数にはイベントのメソッド名を指定します。引数を省略した場合は、すべて
のイベントを対象とするブロックの登録となります。
WIN32OLE_EVENT#on_eventと異なり、イベントのブロック変数に戻り値を
設定できます。
@param event イベント名を文字列かシンボルで指定します。イベント名は大文
字小文字を区別します。省略時にはすべてのイベントが対象となります。
@param args サーバがイベント通知時に指定した引数の配列です。
eventパラメータ... -
Addrinfo
# canonname -> String|nil (18640.0) -
カノニカル名を文字列で返します。
カノニカル名を文字列で返します。
カノニカル名が存在しない場合には nil を返します。
カノニカル名は Addrinfo.getaddrinfo に Socket::AI_CANONINAME
を指定した場合にセットされます。
require 'socket'
list = Addrinfo.getaddrinfo("www.ruby-lang.org", 80, :INET, :STREAM, nil, Socket::AI_CANONNAME)
p list[0] #=> #<Addrinfo: 221.186.184.68:80 TCP carbon.ruby-la... -
Array
. try _ convert(obj) -> Array | nil (18640.0) -
to_ary メソッドを用いて obj を配列に変換しようとします。
to_ary メソッドを用いて obj を配列に変換しようとします。
何らかの理由で変換できないときには nil を返します。
このメソッドは引数が配列であるかどうかを調べるために使えます。
//emlist[例][ruby]{
Array.try_convert([1]) # => [1]
Array.try_convert("1") # => nil
if tmp = Array.try_convert(arg)
# the argument is an array
elsif tmp = String.try_convert(arg)
# the argument ... -
Hash
. try _ convert(obj) -> Hash | nil (18640.0) -
to_hash メソッドを用いて obj をハッシュに変換しようとします。
to_hash メソッドを用いて obj をハッシュに変換しようとします。
何らかの理由で変換できないときには nil を返します。
このメソッドは引数がハッシュであるかどうかを調べるために使えます。
//emlist[][ruby]{
Hash.try_convert({1=>2}) # => {1=>2}
Hash.try_convert("1=>2") # => nil
//} -
Method
# source _ location -> [String , Integer] | nil (18640.0) -
ソースコードのファイル名と行番号を配列で返します。
ソースコードのファイル名と行番号を配列で返します。
その手続オブジェクトが ruby で定義されていない(つまりネイティブ
である)場合は nil を返します。
@see Proc#source_location
//emlist[例][ruby]{
# ------- /tmp/foo.rb ---------
class Foo
def foo; end
end
# ----- end of /tmp/foo.rb ----
require '/tmp/foo'
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.source...