ライブラリ
- ビルトイン (257)
- bigdecimal (7)
-
bigdecimal
/ util (1) -
cgi
/ core (1) - csv (11)
- etc (1)
- fiddle (25)
-
fiddle
/ import (8) -
io
/ console (2) - ipaddr (3)
-
irb
/ context (5) -
irb
/ ext / history (1) -
irb
/ ext / save-history (1) -
irb
/ output-method (3) - json (1)
- logger (2)
- matrix (9)
- mkmf (6)
-
net
/ ftp (1) -
net
/ http (11) -
net
/ imap (6) -
net
/ pop (4) -
net
/ smtp (2) - openssl (40)
- optparse (1)
- pathname (9)
- pp (3)
- prettyprint (6)
- prime (4)
- psych (7)
- rake (1)
- resolv-replace (3)
-
rexml
/ document (2) -
rinda
/ tuplespace (1) -
rubygems
/ commands / dependency _ command (1) -
rubygems
/ package / tar _ reader (1) -
rubygems
/ package / tar _ writer (2) -
rubygems
/ remote _ fetcher (1) -
rubygems
/ requirement (1) -
rubygems
/ user _ interaction (12) - set (3)
- shell (14)
-
shell
/ command-processor (11) -
shell
/ filter (11) -
shell
/ process-controller (2) -
shell
/ system-command (1) - socket (24)
- stringio (17)
- strscan (10)
- sync (1)
-
syslog
/ logger (1) - tracer (1)
- uri (1)
-
webrick
/ httpresponse (1) -
webrick
/ httpservlet / abstract (6) -
webrick
/ httpservlet / filehandler (1) -
webrick
/ httpversion (2) -
webrick
/ log (1) - win32ole (16)
- zlib (8)
クラス
-
ARGF
. class (14) - Addrinfo (2)
- Array (51)
- BasicObject (1)
- BasicSocket (8)
- BigDecimal (7)
- Bignum (3)
- CGI (1)
- CSV (6)
-
CSV
:: Row (3) -
CSV
:: Table (2) - Complex (2)
- Dir (3)
- Enumerator (1)
-
Fiddle
:: Function (3) -
Fiddle
:: Handle (3) -
Fiddle
:: Pointer (19) - File (1)
-
File
:: Stat (1) - Fixnum (3)
- Float (7)
-
Gem
:: Commands :: DependencyCommand (1) -
Gem
:: Package :: TarReader (1) -
Gem
:: Package :: TarWriter :: BoundedStream (1) -
Gem
:: Package :: TarWriter :: RestrictedStream (1) -
Gem
:: RemoteFetcher (1) -
Gem
:: Requirement (1) -
Gem
:: StreamUI (1) - IO (23)
- IPAddr (3)
-
IRB
:: Context (7) -
IRB
:: OutputMethod (2) -
IRB
:: StdioOutputMethod (1) - Integer (60)
- Logger (1)
-
Logger
:: LogDevice (1) - MatchData (4)
- Matrix (9)
- Method (1)
- Module (1)
-
Net
:: FTP (1) -
Net
:: HTTP (9) -
Net
:: IMAP (6) -
Net
:: POP3 (4) -
Net
:: SMTP (2) - Numeric (8)
- Object (10)
-
OpenSSL
:: ASN1 :: ASN1Data (1) -
OpenSSL
:: BN (3) -
OpenSSL
:: OCSP :: BasicResponse (2) -
OpenSSL
:: OCSP :: Request (1) -
OpenSSL
:: OCSP :: Response (1) -
OpenSSL
:: PKey :: EC (1) -
OpenSSL
:: PKey :: EC :: Group (3) -
OpenSSL
:: PKey :: EC :: Point (8) -
OpenSSL
:: SSL :: SSLContext (7) -
OpenSSL
:: SSL :: SSLSocket (1) -
OpenSSL
:: SSL :: Session (1) -
OpenSSL
:: X509 :: CRL (1) -
OpenSSL
:: X509 :: Certificate (1) -
OpenSSL
:: X509 :: Name (1) -
OpenSSL
:: X509 :: Request (1) -
OpenSSL
:: X509 :: StoreContext (1) - OptionParser (1)
- Pathname (9)
- PrettyPrint (6)
- Prime (2)
- Proc (1)
-
Process
:: Status (2) -
Psych
:: Emitter (2) -
Psych
:: Nodes :: Document (1) -
Psych
:: Nodes :: Mapping (1) -
Psych
:: Nodes :: Scalar (1) -
Psych
:: Nodes :: Sequence (1) -
Psych
:: Nodes :: Stream (1) -
REXML
:: Elements (1) -
REXML
:: Formatters :: Pretty (1) - Random (3)
- Range (6)
- Rational (8)
- Regexp (1)
-
Rinda
:: TupleEntry (1) - Set (3)
- Shell (14)
-
Shell
:: CommandProcessor (11) -
Shell
:: Filter (11) -
Shell
:: ProcessController (2) -
Shell
:: SystemCommand (1) -
Socket
:: AncillaryData (7) -
Socket
:: Option (3) - String (22)
- StringIO (17)
- StringScanner (10)
- Symbol (6)
-
Syslog
:: Logger (1) - Thread (2)
-
Thread
:: Mutex (1) - Time (1)
- TracePoint (14)
- Tracer (1)
- UDPSocket (6)
- UNIXSocket (1)
-
URI
:: Generic (1) - UnboundMethod (1)
-
WEBrick
:: BasicLog (1) -
WEBrick
:: Cookie (2) -
WEBrick
:: HTTPResponse (1) -
WEBrick
:: HTTPServlet :: AbstractServlet (6) -
WEBrick
:: HTTPServlet :: DefaultFileHandler (1) -
WEBrick
:: HTTPVersion (2) - WIN32OLE (1)
-
WIN32OLE
_ METHOD (8) -
WIN32OLE
_ TYPE (4) -
WIN32OLE
_ TYPELIB (2) -
WIN32OLE
_ VARIABLE (1) -
Zlib
:: GzipReader (3) -
Zlib
:: GzipWriter (4) -
Zlib
:: Inflate (1)
モジュール
- Enumerable (5)
-
Fiddle
:: Importer (8) -
Gem
:: DefaultUserInteraction (3) -
Gem
:: UserInteraction (8) -
JSON
:: Generator :: GeneratorMethods :: Integer (1) - Kernel (6)
-
Net
:: HTTPHeader (2) -
OpenSSL
:: Buffering (4) -
OpenSSL
:: SSL :: SocketForwarder (1) -
Rake
:: TaskManager (1) -
Sync
_ m (1)
キーワード
- % (2)
- & (2)
- * (3)
- ** (1)
- + (2)
- +@ (1)
- - (2)
- -@ (4)
-
/ (1) - < (1)
- << (2)
- <= (1)
- <=> (5)
- == (3)
- === (1)
- =~ (3)
- > (1)
- >= (1)
- >> (2)
- [] (10)
- []= (5)
- ^ (1)
-
_ _ id _ _ (1) - abi (1)
- alert (1)
-
alert
_ error (1) -
alert
_ warning (1) - ask (1)
-
ask
_ yes _ no (1) -
asn1
_ flag (1) - at (1)
-
back
_ trace _ limit (1) - begin (2)
- bind (2)
- binwrite (1)
-
bit
_ length (3) - bool (1)
- breakable (2)
-
bsearch
_ index (1) - bytes (1)
- bytesize (1)
- call (1)
-
callee
_ id (1) - ceil (5)
- charpos (1)
-
check
_ nonce (1) -
check
_ point (3) -
check
_ sizeof (2) - chmod (4)
-
choose
_ from _ list (1) - chown (4)
- chr (2)
- close (1)
- codepoints (6)
- cofactor (1)
-
cofactor
_ expansion (1) - combination (2)
- connect (1)
-
content
_ length (2) -
continue
_ timeout (1) -
copy
_ nonce (1) - count (7)
-
create
_ value (1) - cycle (2)
- debug (1)
- debug? (1)
-
debug
_ level (1) -
default
_ port (1) -
defined
_ class (1) - delete (3)
-
delete
_ at (1) - denominator (5)
- digits (2)
- disable (2)
- disjoint? (1)
- dispid (1)
- div (2)
- divmod (3)
-
do
_ DELETE (1) -
do
_ GET (1) -
do
_ HEAD (1) -
do
_ OPTIONS (1) -
do
_ POST (1) -
do
_ PUT (1) - downto (2)
-
each
_ codepoint (4) - enable (2)
- enabled? (1)
- encoding (1)
- end (2)
- eql? (2)
- error (1)
-
eval
_ history (1) - event (1)
-
event
_ interface (1) - exist? (1)
- expunge (1)
- extern (1)
- family (2)
- fcntl (2)
- fdiv (1)
- fetch (3)
-
fetch
_ size (1) -
field
_ size _ limit (1) - fileno (3)
-
find
_ index (6) -
finish
_ all _ jobs (3) - first (4)
- flatten (1)
- flatten! (1)
- floor (5)
- free= (1)
- gcd (1)
- gcdlcm (1)
-
get
_ thread _ no (1) - getbyte (3)
- getc (1)
- getsockopt (1)
- group (1)
- hash (5)
- helpcontext (2)
- hex (1)
-
ignore
_ sigint (1) -
ignore
_ sigint= (1) -
ignore
_ sigint? (1) -
import
_ symbol (1) - indentation (1)
- index (7)
- infinity? (1)
- insert (1)
- inspect (1)
-
int
_ from _ prime _ division (1) - integer? (1)
- intern (2)
-
internal
_ encoding (2) - intersect? (1)
- intersection (1)
- invert! (1)
- invkind (1)
- ioctl (2)
-
ip
_ pktinfo (1) -
ip
_ port (1) -
ip
_ unpack (1) -
ipv6
_ pktinfo (1) -
ipv6
_ pktinfo _ ifindex (1) -
keep
_ alive _ timeout (1) - kill (2)
-
kill
_ job (1) -
laplace
_ expansion (1) - last (4)
- lchmod (1)
- lchown (1)
- lcm (1)
- length (4)
- level (3)
-
line
_ width (1) - lineno (4)
- linger (1)
-
local
_ port (1) - major (1)
-
major
_ version (2) -
make
_ affine! (1) - match (1)
- match? (1)
- matchedsize (1)
-
max
_ age (1) -
method
_ id (1) - minor (1)
-
minor
_ version (2) - modulo (1)
-
n
_ bytes (1) -
n
_ mails (1) - nest (1)
- next (1)
- numerator (4)
-
object
_ id (1) - oct (1)
- offset (2)
-
offset
_ vtbl (1) -
ole
_ query _ interface (1) -
on
_ curve? (1) -
open
_ timeout (3) - ord (2)
- pack (1)
- path (1)
- pathconf (1)
-
pending
_ interrupt? (1) - permutation (2)
- pid (2)
-
point
_ conversion _ form (1) -
point
_ conversion _ form= (1) - pointer (1)
- pointer= (1)
- pop (2)
- pos (5)
- pos= (1)
- pow (2)
- pred (1)
-
prepare
_ range (1) -
pretty
_ print (3) -
pretty
_ print _ cycle (1) -
pretty
_ print _ inspect (1) - prime? (1)
-
prime
_ division (2) - print (9)
-
print
_ dependencies (1) - printf (5)
- printn (1)
- priority (1)
-
proxy
_ port (1) - proxyport (1)
- ptr (1)
-
public
_ key (1) -
public
_ method (1) - putc (1)
-
raised
_ exception (1) - rand (3)
-
range
_ length (1) - rationalize (2)
- raw (1)
- raw! (1)
-
read
_ timeout (3) - readbyte (3)
- readchar (1)
-
recv
_ io (1) - recvmsg (1)
-
recvmsg
_ nonblock (1) - ref (1)
- remainder (1)
-
repeated
_ combination (2) -
repeated
_ permutation (2) -
return
_ value (1) -
return
_ vtype (1) - rewind (1)
- rindex (3)
- rm (3)
- rotate (1)
- rotate! (1)
- round (5)
- sample (4)
-
save
_ history (1) - say (1)
- search (1)
- self (1)
- send (5)
- sendmsg (1)
-
sendmsg
_ nonblock (1) - serial (1)
-
session
_ cache _ mode (1) -
session
_ cache _ size (1) -
set
_ encoding (9) -
set
_ to _ infinity! (1) - setbyte (1)
- setsockopt (2)
- sfork (1)
- shift (2)
- size (13)
- size= (1)
- size? (3)
-
size
_ opt _ params (1) -
size
_ params (1) - sizeof (1)
- skip (1)
-
skip
_ until (1) - sleep (1)
- sort (1)
-
source
_ location (3) - split (1)
-
ssl
_ timeout (2) - status (3)
- struct (1)
- style (3)
- succ (1)
- sum (1)
-
summary
_ width (1) - sym (1)
-
sync
_ ex _ count (1) -
sync
_ point? (1) - sysopen (1)
- sysseek (1)
- syswrite (3)
- tag (1)
- taint (1)
- tainted? (1)
- tell (4)
-
terminate
_ interaction (2) - test (3)
- text (2)
- timeout (2)
- times (2)
-
to
_ a (1) -
to
_ bn (2) -
to
_ d (1) -
to
_ i (9) -
to
_ int (3) -
to
_ json (1) -
to
_ s (3) -
to
_ str (2) -
to
_ sym (1) - tr (1)
- trace (1)
- truncate (6)
-
try
_ constant (2) -
try
_ link (2) - type (1)
- typekind (1)
- ui (1)
- ui= (1)
-
uid
_ search (1) -
uid
_ sort (1) - ungetc (1)
- union (1)
- unpack (1)
- untaint (1)
- upto (2)
-
use
_ ui (1) - utime (4)
- value (1)
- varkind (1)
-
verify
_ depth (2) -
verify
_ mode (1) - version (4)
- width (1)
- write (9)
-
write
_ nonblock (3) - | (1)
検索結果
先頭5件
-
Integer
# size -> Integer (9322.0) -
整数の実装上のサイズをバイト数で返します。
整数の実装上のサイズをバイト数で返します。
//emlist[][ruby]{
p 1.size # => 8
p 0x1_0000_0000.size # => 8
//}
@see Integer#bit_length -
Integer
# succ -> Integer (9322.0) -
self の次の整数を返します。
self の次の整数を返します。
//emlist[][ruby]{
1.next #=> 2
(-1).next #=> 0
1.succ #=> 2
(-1).succ #=> 0
//}
@see Integer#pred -
Integer
# |(other) -> Integer (9322.0) -
ビット二項演算子。論理和を計算します。
ビット二項演算子。論理和を計算します。
@param other 数値
//emlist[][ruby]{
1 | 1 # => 1
2 | 3 # => 3
//} -
StringScanner
# pos -> Integer (9322.0) -
現在のスキャンポインタのインデックスを返します。
現在のスキャンポインタのインデックスを返します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.pos # => 0
s.scan(/\w+/) # => "test"
s.pos # => 4
s.scan(/\w+/) # => nil
s.pos # => 4
s.scan(/\s+/) # => " "
s.pos # => 5
//}
@see StringScanner#charpos -
TracePoint
# lineno -> Integer (9322.0) -
発生したイベントの行番号を返します。
発生したイベントの行番号を返します。
@raise RuntimeError イベントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call, :return) do |tp|
tp.lineno
end
trace.enable
foo 1
# => 1
# 3
//} -
Integer
# **(other) -> Numeric (9112.0) -
算術演算子。冪(べき乗)を計算します。
算術演算子。冪(べき乗)を計算します。
@param other 二項演算の右側の引数(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1
... -
Integer
# pow(other) -> Numeric (9112.0) -
算術演算子。冪(べき乗)を計算します。
算術演算子。冪(べき乗)を計算します。
@param other 二項演算の右側の引数(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1
... -
OpenSSL
:: PKey :: EC :: Point # make _ affine! -> self (9100.0) -
@todo @raise OpenSSL::PKey::EC::Point::Error エラーが生じた場合に発生します
@todo
@raise OpenSSL::PKey::EC::Point::Error エラーが生じた場合に発生します -
PrettyPrint
# group(indent = 0 , open _ obj = & # 39;& # 39; , close _ obj = & # 39;& # 39; , open _ width = open _ obj . length , close _ width = close _ obj . length) { . . . } -> () (9094.0) -
与えられたブロックを実行します。 ブロック内で自身に追加される文字列やオブジェクトは、1行にまとめて表示しても よい同じグループに属すると仮定されます。
与えられたブロックを実行します。
ブロック内で自身に追加される文字列やオブジェクトは、1行にまとめて表示しても
よい同じグループに属すると仮定されます。
もう少し詳しく説明します。pretty printing アルゴリズムはインデントと改行を、
ツリー構造を作ることによって決定します。そして、group メソッドは子ノードの作成と
子ノードのインデントの深さの決定を担当します。
同じノード内で呼ばれた breakable は、改行するならば全て同時に改行します。
@param indent グループのインデントの深さを指定します。
@param open_obj 指定された場合、s... -
Fiddle
:: Pointer # []=(offset , len , v) (9082.0) -
自身の指すアドレスに offset バイトを足したメモリ領域の先頭 len バイトに 文字列 v をコピーします。
自身の指すアドレスに offset バイトを足したメモリ領域の先頭 len バイトに
文字列 v をコピーします。
str のサイズが len より小さい場合は、残りの領域を 0 で埋めます。
コピー先の領域が len より大きいか検証しません。
@param offset 書き換えたいメモリ領域のオフセットを整数で与えます。
@param len 書き換えたいメモリ領域のサイズを整数で指定します。
@param v メモリ領域にセットしたいバイト列を文字列で指定します。
@raise Fiddle::DLError self の保持するポインタが NULL である場合に発生します... -
Integer
# chr -> String (9076.0) -
self を文字コードとして見た時に、引数で与えたエンコーディング encoding に対応する文字を返します。
self を文字コードとして見た時に、引数で与えたエンコーディング 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
//}
引数無しで呼ばれた場合は self ... -
Integer
# chr(encoding) -> String (9076.0) -
self を文字コードとして見た時に、引数で与えたエンコーディング encoding に対応する文字を返します。
self を文字コードとして見た時に、引数で与えたエンコーディング 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
//}
引数無しで呼ばれた場合は self ... -
Fiddle
:: Pointer # [](offset , len) -> String (9064.0) -
自身の指すアドレスに offset バイトを足したメモリ領域の先頭 len バイトを複製し、 文字列として返します。
自身の指すアドレスに offset バイトを足したメモリ領域の先頭 len バイトを複製し、
文字列として返します。
(self + offset).to_s(len) と同等です。
offset + len が自身のサイズより小さいかを検証しません。
@param offset 値を得たい領域の先頭のアドレスまでのオフセットを整数で与えます。
@param len 値を得たい領域のサイズを指定します。
@raise Fiddle::DLError self の保持するポインタが NULL である場合に発生します
例:
require 'fiddle'
s = 'abc'
... -
Integer
# / (other) -> Numeric (9058.0) -
除算の算術演算子。
除算の算術演算子。
other が Integer の場合、整商(整数の商)を Integer で返します。
普通の商(剰余を考えない商)を越えない最大の整数をもって整商とします。
other が Float、Rational、Complex の場合、普通の商を other と
同じクラスのインスタンスで返します。
@param other 二項演算の右側の引数(対象)
@return 計算結果
//emlist[例][ruby]{
7 / 2 # => 3
7 / -2 # => -4
7 / 2.0 # => 3.5
7 / Rational(2, 1) # => (7/2)
7... -
Integer
# downto(min) -> Enumerator (9058.0) -
self から min まで 1 ずつ減らしながらブロックを繰り返し実行します。 self < min であれば何もしません。
self から min まで 1 ずつ減らしながらブロックを繰り返し実行します。
self < min であれば何もしません。
@param min 数値
@return self を返します。
//emlist[][ruby]{
5.downto(1) {|i| print i, " " } # => 5 4 3 2 1
//}
@see Integer#upto, Numeric#step, Integer#times -
Integer
# downto(min) {|n| . . . } -> self (9058.0) -
self から min まで 1 ずつ減らしながらブロックを繰り返し実行します。 self < min であれば何もしません。
self から min まで 1 ずつ減らしながらブロックを繰り返し実行します。
self < min であれば何もしません。
@param min 数値
@return self を返します。
//emlist[][ruby]{
5.downto(1) {|i| print i, " " } # => 5 4 3 2 1
//}
@see Integer#upto, Numeric#step, Integer#times -
Integer
# inspect(base=10) -> String (9058.0) -
整数を 10 進文字列表現に変換します。
整数を 10 進文字列表現に変換します。
引数を指定すれば、それを基数とした文字列表
現に変換します。
//emlist[][ruby]{
p 10.to_s(2) # => "1010"
p 10.to_s(8) # => "12"
p 10.to_s(16) # => "a"
p 35.to_s(36) # => "z"
//}
@return 数値の文字列表現
@param base 基数となる 2 - 36 の数値。
@raise ArgumentError base に 2 - 36 以外の数値を指定した場合に発生します。 -
Integer
# to _ s(base=10) -> String (9058.0) -
整数を 10 進文字列表現に変換します。
整数を 10 進文字列表現に変換します。
引数を指定すれば、それを基数とした文字列表
現に変換します。
//emlist[][ruby]{
p 10.to_s(2) # => "1010"
p 10.to_s(8) # => "12"
p 10.to_s(16) # => "a"
p 35.to_s(36) # => "z"
//}
@return 数値の文字列表現
@param base 基数となる 2 - 36 の数値。
@raise ArgumentError base に 2 - 36 以外の数値を指定した場合に発生します。 -
Integer
# upto(max) -> Enumerator (9058.0) -
self から max まで 1 ずつ増やしながら繰り返します。 self > max であれば何もしません。
self から max まで 1 ずつ増やしながら繰り返します。
self > max であれば何もしません。
@param max 数値
@return self を返します。
//emlist[][ruby]{
5.upto(10) {|i| print i, " " } # => 5 6 7 8 9 10
//}
@see Integer#downto, Numeric#step, Integer#times -
StringScanner
# pos=(n) (9058.0) -
スキャンポインタのインデックスを n にセットします。
スキャンポインタのインデックスを n にセットします。
@param n 整数で、バイト単位で指定します。
負数を指定すると文字列の末尾からのオフセットとして扱います。
@raise RangeError マッチ対象の文字列の長さを超える値を指定すると発生します。
@return n を返します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
p s.scan(/\w+/) # => "test"
p s.pos = 1 # => 1
p s.scan(/\... -
Fiddle
:: Pointer # []=(offset , n) (9052.0) -
自身の指すアドレスに offset バイトを足したメモリ領域を指定された n に書き換えます。
自身の指すアドレスに offset バイトを足したメモリ領域を指定された n に書き換えます。
@param n 整数を指定します。
@raise Fiddle::DLError self の保持するポインタが NULL である場合に発生します
例:
require 'fiddle'
s = 'abc'
cptr = Fiddle::Pointer[s]
cptr[0] = 65
p cptr.to_s #=> "Bbc" -
Shell
# finish _ all _ jobs (9052.0) -
@todo
@todo -
Shell
:: CommandProcessor # finish _ all _ jobs (9052.0) -
@todo
@todo -
Shell
:: Filter # finish _ all _ jobs (9052.0) -
@todo
@todo -
Gem
:: DefaultUserInteraction # ui=(new _ ui) (9040.0) -
デフォルトの UI を新しくセットします。
デフォルトの UI を新しくセットします。
@param new_ui 新しい UI を指定します。
@see Gem::DefaultUserInteraction.ui= -
Gem
:: DefaultUserInteraction # use _ ui(new _ ui) { . . . } (9040.0) -
与えられたブロックを評価している間だけ UI として new_ui を使用します。
与えられたブロックを評価している間だけ UI として new_ui を使用します。
@param new_ui 新しい UI を指定します。
@see Gem::DefaultUserInteraction.use_ui -
Gem
:: UserInteraction # ask _ yes _ no(*args) -> bool (9040.0) -
イエス、ノーで答える質問をします。
イエス、ノーで答える質問をします。
@param args 委譲先のメソッドに与える引数です。
@return ユーザの回答がイエスの場合は真を、ノーの場合は偽を返します。 -
Gem
:: UserInteraction # choose _ from _ list(*args) -> Array (9040.0) -
リストから回答を選択する質問をします。
リストから回答を選択する質問をします。
@param args 委譲先のメソッドに与える引数です。
@return 選択肢の名称と選択肢のインデックスを要素とする配列を返します。 -
Integer
# %(other) -> Numeric (9040.0) -
算術演算子。剰余を計算します。
算術演算子。剰余を計算します。
//emlist[][ruby]{
13 % 4 # => 1
13 % -4 # => -3
-13 % 4 # => 3
-13 % -4 # => -1
//}
@param other 二項演算の右側の引数(対象)
@return 計算結果 -
Integer
# *(other) -> Numeric (9040.0) -
算術演算子。積を計算します。
算術演算子。積を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果
//emlist[][ruby]{
2 * 3 # => 6
//} -
Integer
# +(other) -> Numeric (9040.0) -
算術演算子。和を計算します。
算術演算子。和を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果
//emlist[][ruby]{
3 + 4 # => 7
//} -
Integer
# -(other) -> Numeric (9040.0) -
算術演算子。差を計算します。
算術演算子。差を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果
//emlist[][ruby]{
4 - 1 #=> 3
//} -
Integer
# <(other) -> bool (9040.0) -
比較演算子。数値として小さいか判定します。
比較演算子。数値として小さいか判定します。
@param other 比較対象の数値
@return self よりも other が大きい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 < 1 # => false
1 < 2 # => true
//} -
Integer
# <=(other) -> bool (9040.0) -
比較演算子。数値として等しいまたは小さいか判定します。
比較演算子。数値として等しいまたは小さいか判定します。
@param other 比較対象の数値
@return self よりも other の方が大きい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 <= 0 # => false
1 <= 1 # => true
1 <= 2 # => true
//} -
Integer
# <=>(other) -> -1 | 0 | 1 | nil (9040.0) -
self と other を比較して、self が大きい時に1、等しい時に 0、小さい時 に-1、比較できない時に nil を返します。
self と other を比較して、self が大きい時に1、等しい時に 0、小さい時
に-1、比較できない時に nil を返します。
@param other 比較対象の数値
@return -1 か 0 か 1 か nil のいずれか
//emlist[][ruby]{
1 <=> 2 # => -1
1 <=> 1 # => 0
2 <=> 1 # => 1
2 <=> '' # => nil
//} -
Integer
# ==(other) -> bool (9040.0) -
比較演算子。数値として等しいか判定します。
比較演算子。数値として等しいか判定します。
@param other 比較対象の数値
@return self と other が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 == 2 # => false
1 == 1.0 # => true
//} -
Integer
# ===(other) -> bool (9040.0) -
比較演算子。数値として等しいか判定します。
比較演算子。数値として等しいか判定します。
@param other 比較対象の数値
@return self と other が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 == 2 # => false
1 == 1.0 # => true
//} -
Integer
# >(other) -> bool (9040.0) -
比較演算子。数値として大きいか判定します。
比較演算子。数値として大きいか判定します。
@param other 比較対象の数値
@return self よりも other の方が小さい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 > 0 # => true
1 > 1 # => false
//} -
Integer
# >=(other) -> bool (9040.0) -
比較演算子。数値として等しいまたは大きいか判定します。
比較演算子。数値として等しいまたは大きいか判定します。
@param other 比較対象の数値
@return self よりも other の方が小さい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 >= 0 # => true
1 >= 1 # => true
1 >= 2 # => false
//} -
Integer
# fdiv(other) -> Numeric (9040.0) -
self を other で割った商を Float で返します。 ただし Complex が関わる場合は例外です。 その場合も成分は Float になります。
self を other で割った商を Float で返します。
ただし Complex が関わる場合は例外です。
その場合も成分は Float になります。
@param other self を割る数を指定します。
例:
654321.fdiv(13731) # => 47.652829364212366
654321.fdiv(13731.24) # => 47.65199646936475
-1234567890987654321.fdiv(13731) # => -89910996357705.52
-1234567890987654... -
Integer
# modulo(other) -> Numeric (9040.0) -
算術演算子。剰余を計算します。
算術演算子。剰余を計算します。
//emlist[][ruby]{
13 % 4 # => 1
13 % -4 # => -3
-13 % 4 # => 3
-13 % -4 # => -1
//}
@param other 二項演算の右側の引数(対象)
@return 計算結果 -
Integer
# remainder(other) -> Numeric (9040.0) -
self を other で割った余り r を返します。
self を other で割った余り r を返します。
r の符号は self と同じになります。
@param other self を割る数。
//emlist[][ruby]{
5.remainder(3) # => 2
-5.remainder(3) # => -2
5.remainder(-3) # => 2
-5.remainder(-3) # => -2
-1234567890987654321.remainder(13731) # => -6966
-1234567890987654321.remainder(13731.24) #... -
OpenSSL
:: PKey :: EC :: Point # infinity? -> bool (9040.0) -
自身が無限遠点であるならば true を返します。
自身が無限遠点であるならば true を返します。
@raise OpenSSL::PKey::EC::Point::Error エラーが生じた場合に発生します
@see OpenSSL::PKey::EC::Point#set_to_infinity! -
OpenSSL
:: PKey :: EC :: Point # set _ to _ infinity! -> self (9040.0) -
自身を無限遠点に設定します。
自身を無限遠点に設定します。
@raise OpenSSL::PKey::EC::Point::Error エラーが生じた場合に発生します
@see OpenSSL::PKey::EC::Point#infinity! -
PrettyPrint
# breakable(sep = & # 39; & # 39;) -> () (9040.0) -
「必要ならここで改行出来る」ということを自身に通知します。 もしその位置で改行されなければ、width カラムのテキスト sep が出力の際にそこに挿入されます。
「必要ならここで改行出来る」ということを自身に通知します。
もしその位置で改行されなければ、width カラムのテキスト sep が出力の際にそこに挿入されます。
@param sep 改行が起きなかった場合に挿入されるテキストを文字列で指定します。
@param width テキスト sep は width カラムであると仮定されます。指定されなければ、
sep.length が利用されます。例えば sep が多バイト文字の際に指定する必要があるかも知れません。 -
PrettyPrint
# breakable(sep , width = sep . length) -> () (9040.0) -
「必要ならここで改行出来る」ということを自身に通知します。 もしその位置で改行されなければ、width カラムのテキスト sep が出力の際にそこに挿入されます。
「必要ならここで改行出来る」ということを自身に通知します。
もしその位置で改行されなければ、width カラムのテキスト sep が出力の際にそこに挿入されます。
@param sep 改行が起きなかった場合に挿入されるテキストを文字列で指定します。
@param width テキスト sep は width カラムであると仮定されます。指定されなければ、
sep.length が利用されます。例えば sep が多バイト文字の際に指定する必要があるかも知れません。 -
PrettyPrint
# text(obj) -> () (9040.0) -
obj を width カラムのテキストとして自身に追加します。
obj を width カラムのテキストとして自身に追加します。
@param obj 自身に追加するテキストを文字列で指定します。
@param width obj のカラムを指定します。指定されなかった場合、obj.length が利用されます。 -
PrettyPrint
# text(obj , width = obj . length) -> () (9040.0) -
obj を width カラムのテキストとして自身に追加します。
obj を width カラムのテキストとして自身に追加します。
@param obj 自身に追加するテキストを文字列で指定します。
@param width obj のカラムを指定します。指定されなかった場合、obj.length が利用されます。 -
TracePoint
# callee _ id -> Symbol | nil (9040.0) -
イベントが発生したメソッドの呼ばれた名前を Symbol で返します。 トップレベルであった場合は nil を返します。
イベントが発生したメソッドの呼ばれた名前を Symbol で返します。
トップレベルであった場合は nil を返します。
@raise RuntimeError イベントフックの外側で実行した場合に発生します。
//emlist[][ruby]{
class C
def method_name
end
alias alias_name method_name
end
trace = TracePoint.new(:call) do |tp|
p [tp.method_id, tp.callee_id] # => [:method_name, :alias_name]
e... -
TracePoint
# method _ id -> Symbol | nil (9040.0) -
イベントが発生したメソッドの定義時の名前を Symbol で返します。 トップレベルであった場合は nil を返します。
イベントが発生したメソッドの定義時の名前を Symbol で返します。
トップレベルであった場合は nil を返します。
@raise RuntimeError イベントフックの外側で実行した場合に発生します。
//emlist[][ruby]{
class C
def method_name
end
alias alias_name method_name
end
trace = TracePoint.new(:call) do |tp|
p [tp.method_id, tp.callee_id] # => [:method_name, :alias_name]
e... -
Fiddle
:: Pointer # ==(other) -> bool (9022.0) -
ポインタの指すアドレスが同一ならばtrueを返します。
ポインタの指すアドレスが同一ならばtrueを返します。
@param other 比較対象の Pointer オブジェクト
例:
require 'fiddle'
s = 'abc'
cptr = Fiddle::Pointer[s]
cptr0 = Fiddle::Pointer[s]
cptr1 = cptr + 1
p cptr == cptr1 #=> false
p cptr == cptr0 #=> true -
Fiddle
:: Pointer # eql?(other) -> bool (9022.0) -
ポインタの指すアドレスが同一ならばtrueを返します。
ポインタの指すアドレスが同一ならばtrueを返します。
@param other 比較対象の Pointer オブジェクト
例:
require 'fiddle'
s = 'abc'
cptr = Fiddle::Pointer[s]
cptr0 = Fiddle::Pointer[s]
cptr1 = cptr + 1
p cptr == cptr1 #=> false
p cptr == cptr0 #=> true -
Fiddle
:: Pointer # free=(cfunc) (9022.0) -
GC が自身を解放するのに使う関数を Fiddle::CFunc で指定します。
GC が自身を解放するのに使う関数を Fiddle::CFunc で指定します。
@param cfunc 自身を解放するのに使われる関数を Fiddle::CFunc か整数で指定します。 -
Fiddle
:: Pointer # size=(s) (9022.0) -
自身の指す領域のサイズを変えます。
自身の指す領域のサイズを変えます。
変更してもメモリの再割り当てはしません。単にオブジェクトが記録している
size の情報が変更されるだけです。
@param s 自身が指すメモリのサイズを整数で指定します。 -
Fiddle
:: Pointer # to _ s -> String (9022.0) -
自身が指す領域から長さ len の文字列を複製して返します。
自身が指す領域から長さ len の文字列を複製して返します。
len を省略した場合は、文字列の終りは '\0' であると仮定して、
strlen(3) を使って長さを算出します。
@param len 文字列の長さを整数で指定します。 -
Fiddle
:: Pointer # to _ s(len) -> String (9022.0) -
自身が指す領域から長さ len の文字列を複製して返します。
自身が指す領域から長さ len の文字列を複製して返します。
len を省略した場合は、文字列の終りは '\0' であると仮定して、
strlen(3) を使って長さを算出します。
@param len 文字列の長さを整数で指定します。 -
Fiddle
:: Pointer # to _ str -> String (9022.0) -
自身が指す領域から長さ len の文字列を複製して返します。
自身が指す領域から長さ len の文字列を複製して返します。
len を省略した場合は、self.size をその代わりに使います。
@param len 文字列の長さを整数で指定します。 -
Fiddle
:: Pointer # to _ str(len) -> String (9022.0) -
自身が指す領域から長さ len の文字列を複製して返します。
自身が指す領域から長さ len の文字列を複製して返します。
len を省略した場合は、self.size をその代わりに使います。
@param len 文字列の長さを整数で指定します。 -
Gem
:: DefaultUserInteraction # ui -> Gem :: ConsoleUI (9022.0) -
デフォルトの UI を返します。
デフォルトの UI を返します。
@see Gem::DefaultUserInteraction.ui -
Gem
:: UserInteraction # alert(*args) -> () (9022.0) -
INFO レベルのアラートを出力します。
INFO レベルのアラートを出力します。
@param args 委譲先のメソッドに与える引数です。 -
Gem
:: UserInteraction # alert _ error(*args) -> () (9022.0) -
ERROR レベルのアラートを出力します。
ERROR レベルのアラートを出力します。
@param args 委譲先のメソッドに与える引数です。 -
Gem
:: UserInteraction # alert _ warning(*args) -> () (9022.0) -
WARNING レベルのアラートを出力します。
WARNING レベルのアラートを出力します。
@param args 委譲先のメソッドに与える引数です。 -
Gem
:: UserInteraction # ask(*args) -> String (9022.0) -
質問をして、ユーザの入力を待ち受けて回答を返します。
質問をして、ユーザの入力を待ち受けて回答を返します。
@param args 委譲先のメソッドに与える引数です。 -
Gem
:: UserInteraction # say(*args) -> () (9022.0) -
与えられた文字列を表示します。
与えられた文字列を表示します。
@param args 委譲先のメソッドに与える引数です。 -
Integer
# prime? -> bool (9022.0) -
自身が素数である場合、真を返します。 そうでない場合は偽を返します。
自身が素数である場合、真を返します。
そうでない場合は偽を返します。
//emlist[例][ruby]{
require 'prime'
1.prime? # => false
2.prime? # => true
//}
@see Prime#prime? -
Integer
# rationalize -> Rational (9022.0) -
自身を Rational に変換します。
自身を Rational に変換します。
@param eps 許容する誤差
引数 eps は常に無視されます。
//emlist[][ruby]{
2.rationalize # => (2/1)
2.rationalize(100) # => (2/1)
2.rationalize(0.1) # => (2/1)
//} -
Integer
# rationalize(eps) -> Rational (9022.0) -
自身を Rational に変換します。
自身を Rational に変換します。
@param eps 許容する誤差
引数 eps は常に無視されます。
//emlist[][ruby]{
2.rationalize # => (2/1)
2.rationalize(100) # => (2/1)
2.rationalize(0.1) # => (2/1)
//} -
Integer
# times -> Enumerator (9022.0) -
self 回だけ繰り返します。 self が正の整数でない場合は何もしません。
self 回だけ繰り返します。
self が正の整数でない場合は何もしません。
またブロックパラメータには 0 から self - 1 までの数値が渡されます。
//emlist[][ruby]{
3.times { puts "Hello, World!" } # Hello, World! と3行続いて表示される。
0.times { puts "Hello, World!" } # 何も表示されない。
5.times {|n| print n } # 01234 と表示される。
//}
@see Integer#upto, Integer#downto,... -
Integer
# times {|n| . . . } -> self (9022.0) -
self 回だけ繰り返します。 self が正の整数でない場合は何もしません。
self 回だけ繰り返します。
self が正の整数でない場合は何もしません。
またブロックパラメータには 0 から self - 1 までの数値が渡されます。
//emlist[][ruby]{
3.times { puts "Hello, World!" } # Hello, World! と3行続いて表示される。
0.times { puts "Hello, World!" } # 何も表示されない。
5.times {|n| print n } # 01234 と表示される。
//}
@see Integer#upto, Integer#downto,... -
Integer
# to _ bn -> OpenSSL :: BN (9022.0) -
Integer を同じ数を表す OpenSSL::BN のオブジェクトに 変換します。
Integer を同じ数を表す OpenSSL::BN のオブジェクトに
変換します。
//emlist[][ruby]{
require 'pp'
require 'openssl'
pp 5.to_bn #=> #<OpenSSL::BN 5>
pp (-5).to_bn #=> #<OpenSSL::BN -5>
//}
なお、実装は、以下のようになっています。
//emlist[][ruby]{
class Integer
def to_bn
OpenSSL::BN::new(self)
end
end
//}
@see OpenSSL::BN.n... -
Integer
# to _ d -> BigDecimal (9022.0) -
自身を BigDecimal に変換します。BigDecimal(self) と同じです。
自身を BigDecimal に変換します。BigDecimal(self) と同じです。
@return BigDecimal に変換したオブジェクト -
JSON
:: Generator :: GeneratorMethods :: Integer # to _ json(state _ or _ hash = nil) -> String (9022.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
10.to_json # => "10"
//} -
OpenSSL
:: PKey :: EC :: Point # ==(other) -> bool (9022.0) -
自身が other と等しいならば true を返します。
自身が other と等しいならば true を返します。
@raise OpenSSL::PKey::EC::Point::Error エラーが生じた場合に発生します -
OpenSSL
:: PKey :: EC :: Point # eql?(other) -> bool (9022.0) -
自身が other と等しいならば true を返します。
自身が other と等しいならば true を返します。
@raise OpenSSL::PKey::EC::Point::Error エラーが生じた場合に発生します -
OpenSSL
:: PKey :: EC :: Point # invert! -> self (9022.0) -
自身をその逆元に設定します。
自身をその逆元に設定します。
@raise OpenSSL::PKey::EC::Point::Error エラーが生じた場合に発生します -
OpenSSL
:: PKey :: EC :: Point # on _ curve? -> bool (9022.0) -
点が曲線上にあるならば真を返します。
点が曲線上にあるならば真を返します。
OpenSSL::PKey::EC::Group で得られる群と関連付けられた
曲線を考えます。
@raise OpenSSL::PKey::EC::Point::Error エラーが生じた場合に発生します -
OpenSSL
:: PKey :: EC :: Point # to _ bn -> OpenSSL :: BN (9022.0) -
点を整数に変換します。
点を整数に変換します。
@raise OpenSSL::PKey::EC::Point::Error 変換に失敗した場合に発生します -
PrettyPrint
# nest(indent) { . . . } -> () (9022.0) -
自身の現在のインデントを indent だけ増加させてから、ブロックを実行し、元に戻します。
自身の現在のインデントを indent だけ増加させてから、ブロックを実行し、元に戻します。
@param indent インデントの増加分を整数で指定します。 -
Symbol
# to _ sym -> self (9022.0) -
self を返します。
self を返します。
例:
:foo.intern # => :foo
@see String#intern -
TracePoint
# defined _ class -> Class | module (9022.0) -
メソッドを定義したクラスかモジュールを返します。
メソッドを定義したクラスかモジュールを返します。
//emlist[例][ruby]{
class C; def foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => C
end.enable do
C.new.foo
end
//}
メソッドがモジュールで定義されていた場合も(include に関係なく)モジュー
ルを返します。
//emlist[例][ruby]{
module M; def foo; end; end
class C; include M; end;
trac... -
TracePoint
# disable -> bool (9022.0) -
self のトレースを無効にします。
self のトレースを無効にします。
実行前の TracePoint#enabled? を返します。(トレースが既に有効であっ
た場合は true を返します。そうでなければ false を返します)
//emlist[例][ruby]{
trace.enabled? # => true
trace.disable # => false (実行前の状態)
trace.enabled? # => false
trace.disable # => false
//}
ブロックが与えられた場合、ブロック内でのみトレースが無効になります。
この場合はブロックの評価結果を返します。
//e... -
TracePoint
# disable { . . . } -> object (9022.0) -
self のトレースを無効にします。
self のトレースを無効にします。
実行前の TracePoint#enabled? を返します。(トレースが既に有効であっ
た場合は true を返します。そうでなければ false を返します)
//emlist[例][ruby]{
trace.enabled? # => true
trace.disable # => false (実行前の状態)
trace.enabled? # => false
trace.disable # => false
//}
ブロックが与えられた場合、ブロック内でのみトレースが無効になります。
この場合はブロックの評価結果を返します。
//e... -
TracePoint
# enable -> bool (9022.0) -
self のトレースを有効にします。
self のトレースを有効にします。
実行前の TracePoint#enabled? を返します。(トレースが既に有効であっ
た場合は true を返します。そうでなければ false を返します)
//emlist[例][ruby]{
trace.enabled? # => false
trace.enable # => false (実行前の状態)
# トレースが有効
trace.enabled? # => true
trace.enable # => true (実行前の状態)
# 引き続きトレースが有効
//}
ブロックが与えられた場合、ブロック内でのみ... -
TracePoint
# enable { . . . } -> object (9022.0) -
self のトレースを有効にします。
self のトレースを有効にします。
実行前の TracePoint#enabled? を返します。(トレースが既に有効であっ
た場合は true を返します。そうでなければ false を返します)
//emlist[例][ruby]{
trace.enabled? # => false
trace.enable # => false (実行前の状態)
# トレースが有効
trace.enabled? # => true
trace.enable # => true (実行前の状態)
# 引き続きトレースが有効
//}
ブロックが与えられた場合、ブロック内でのみ... -
TracePoint
# enabled? -> bool (9022.0) -
self のトレースが有効な場合に true を、そうでない場合に false を返しま す。
self のトレースが有効な場合に true を、そうでない場合に false を返しま
す。
@see TracePoint#enable, TracePoint#disable -
TracePoint
# event -> Symbol (9022.0) -
発生したイベントの種類を Symbol で返します。
発生したイベントの種類を Symbol で返します。
発生するイベントの詳細については、TracePoint.new を参照してくださ
い。
@raise RuntimeError イベントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call, :return) do |tp|
p tp.event
end
trace.enable
foo 1
# => :call
# :return
//} -
TracePoint
# path -> String (9022.0) -
イベントが発生したファイルのパスを返します。
イベントが発生したファイルのパスを返します。
@raise RuntimeError イベントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.path # => "/path/to/test.rb"
end
trace.enable
foo 1
//} -
TracePoint
# raised _ exception -> Exception (9022.0) -
発生した例外を返します。
発生した例外を返します。
@raise RuntimeError :raise イベントのためのイベントフックの外側で実行し
た場合に発生します。
//emlist[例][ruby]{
trace = TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided by 0>
end
trace.enable
begin
0/0
rescue
end
//} -
TracePoint
# return _ value -> object (9022.0) -
メソッドやブロックの戻り値を返します。
メソッドやブロックの戻り値を返します。
@raise RuntimeError :return、:c_return、:b_return イベントのためのイベ
ントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:return) do |tp|
p tp.return_value # => 1
end
trace.enable
foo 1
//} -
TracePoint
# self -> object (9022.0) -
イベントを発生させたオブジェクトを返します。
イベントを発生させたオブジェクトを返します。
以下のようにする事で同じ値を取得できます。
//emlist[例][ruby]{
trace.binding.eval('self')
//}
@see TracePoint#binding -
BigDecimal
# split -> [Integer , String , Integer , Integer] (922.0) -
BigDecimal 値を 0.xxxxxxx*10**n と表現したときに、 符号 (NaNのときは 0、それ以外は+1か-1になります)、 仮数部分の文字列("xxxxxxx")と、基数(10)、更に指数 n を配列で返します。
BigDecimal 値を 0.xxxxxxx*10**n と表現したときに、
符号 (NaNのときは 0、それ以外は+1か-1になります)、
仮数部分の文字列("xxxxxxx")と、基数(10)、更に指数 n を配列で返します。
//emlist[][ruby]{
require "bigdecimal"
a = BigDecimal("3.14159265")
f, x, y, z = a.split
//}
とすると、f = 1、x = "314159265"、y = 10、z = 1 になります。
従って、以下のようにする事で Float に変換することができます。
//em... -
Prime
# prime _ division(value , generator= Prime :: Generator23 . new) -> [[Integer , Integer]] (694.0) -
与えられた整数を素因数分解します。
与えられた整数を素因数分解します。
@param value 素因数分解する任意の整数を指定します。
@param generator 素数生成器のインスタンスを指定します。
@return 素因数とその指数から成るペアを要素とする配列です。つまり、戻り値の各要素は2要素の配列 [n,e] であり、それぞれの内部配列の第1要素 n は value の素因数、第2要素は n**e が value を割り切る最大の自然数 e です。
@raise ZeroDivisionError 与えられた数値がゼロである場合に発生します。
//emlist[例][ruby]{
require 'p... -
MatchData
# offset(n) -> [Integer , Integer] | [nil , nil] (667.0) -
n 番目の部分文字列のオフセットの配列 [start, end] を返 します。
n 番目の部分文字列のオフセットの配列 [start, end] を返
します。
//emlist[例][ruby]{
[ self.begin(n), self.end(n) ]
//}
と同じです。n番目の部分文字列がマッチしていなければ
[nil, nil] を返します。
@param n 部分文字列を指定する数値
@raise IndexError 範囲外の n を指定した場合に発生します。
@see MatchData#begin, MatchData#end -
MatchData
# offset(name) -> [Integer , Integer] | [nil , nil] (667.0) -
name という名前付きグループに対応する部分文字列のオフセットの配列 [start, end] を返 します。
name という名前付きグループに対応する部分文字列のオフセットの配列 [start, end] を返
します。
//emlist[例][ruby]{
[ self.begin(name), self.end(name) ]
//}
と同じです。nameの名前付きグループにマッチした部分文字列がなければ
[nil, nil] を返します。
@param name 名前(シンボルか文字列)
@raise IndexError 正規表現中で定義されていない name を指定した場合に発生します。
//emlist[例][ruby]{
/(?<year>\d{4})年(?<month>\... -
Matrix
# find _ index(selector = :all) {|e| . . . } -> [Integer , Integer] | nil (640.0) -
指定した値と一致する要素の位置を [row, column] という配列で返します。 ブロックを与えた場合は各要素を引数としてブロックを呼び出し、 返り値が真であった要素の位置を返します。
指定した値と一致する要素の位置を [row, column] という配列で返します。
ブロックを与えた場合は各要素を引数としてブロックを呼び出し、
返り値が真であった要素の位置を返します。
複数の位置で値が一致する/ブロックが真を返す、場合は最初
に見つかった要素の位置を返します。
selector で行列のどの部分を探すかを指定します。この引数の意味は
Matrix#each を参照してください。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
Matrix[ ... -
Matrix
# find _ index(value , selector = :all) -> [Integer , Integer] | nil (640.0) -
指定した値と一致する要素の位置を [row, column] という配列で返します。 ブロックを与えた場合は各要素を引数としてブロックを呼び出し、 返り値が真であった要素の位置を返します。
指定した値と一致する要素の位置を [row, column] という配列で返します。
ブロックを与えた場合は各要素を引数としてブロックを呼び出し、
返り値が真であった要素の位置を返します。
複数の位置で値が一致する/ブロックが真を返す、場合は最初
に見つかった要素の位置を返します。
selector で行列のどの部分を探すかを指定します。この引数の意味は
Matrix#each を参照してください。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
Matrix[ ... -
Matrix
# index(selector = :all) {|e| . . . } -> [Integer , Integer] | nil (640.0) -
指定した値と一致する要素の位置を [row, column] という配列で返します。 ブロックを与えた場合は各要素を引数としてブロックを呼び出し、 返り値が真であった要素の位置を返します。
指定した値と一致する要素の位置を [row, column] という配列で返します。
ブロックを与えた場合は各要素を引数としてブロックを呼び出し、
返り値が真であった要素の位置を返します。
複数の位置で値が一致する/ブロックが真を返す、場合は最初
に見つかった要素の位置を返します。
selector で行列のどの部分を探すかを指定します。この引数の意味は
Matrix#each を参照してください。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
Matrix[ ... -
Matrix
# index(value , selector = :all) -> [Integer , Integer] | nil (640.0) -
指定した値と一致する要素の位置を [row, column] という配列で返します。 ブロックを与えた場合は各要素を引数としてブロックを呼び出し、 返り値が真であった要素の位置を返します。
指定した値と一致する要素の位置を [row, column] という配列で返します。
ブロックを与えた場合は各要素を引数としてブロックを呼び出し、
返り値が真であった要素の位置を返します。
複数の位置で値が一致する/ブロックが真を返す、場合は最初
に見つかった要素の位置を返します。
selector で行列のどの部分を探すかを指定します。この引数の意味は
Matrix#each を参照してください。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
Matrix[ ... -
WEBrick
:: HTTPServlet :: DefaultFileHandler # prepare _ range(range , filesize) -> [Integer , Integer] (640.0) -
WEBrick::HTTPServlet::DefaultFileHandler#make_partial_content で利用する範囲情報を生成して返します。
WEBrick::HTTPServlet::DefaultFileHandler#make_partial_content で利用する範囲情報を生成して返します。
@param range 2 要素の配列を指定します。
@param filesize ファイルサイズを指定します。 -
OpenSSL
:: OCSP :: BasicResponse # status -> [[OpenSSL :: OCSP :: CertificateId , Integer , Integer , Time|nil , Time , Time|nil , [OpenSSL :: X509 :: Extension]]] (622.0) -
証明書の状態の問い合わせの結果を返します。
証明書の状態の問い合わせの結果を返します。
この返り値には複数の問い合わせ結果が含まれています。
個々の結果は以下の内容の配列です。
[ 問い合わせの CertificateId オブジェクト,
ステータスコード,
失効理由コード,
失効時刻,
最終更新時刻,
次回更新時刻,
拡張領域 ]
ステータスコードはいかのいずれかの値を取ります
* OpenSSL::OCSP::V_CERTSTATUS_GOOD 正常
* OpenSSL::OCSP::V_CERTSTATUS_REVOKED 失効
* OpenSSL::OCSP::...