ライブラリ
- ビルトイン (61)
- benchmark (1)
-
cgi
/ core (2) - csv (4)
- date (2)
- fiddle (4)
-
fiddle
/ import (1) -
io
/ console (2) -
irb
/ context (3) -
irb
/ input-method (5) - json (5)
-
json
/ add / date _ time (1) - matrix (3)
- mkmf (6)
-
net
/ ftp (4) - openssl (5)
- pathname (2)
- psych (1)
- rake (2)
-
rdoc
/ context (1) - resolv (1)
-
rexml
/ document (2) -
rubygems
/ dependency _ list (1) -
rubygems
/ package / tar _ reader / entry (1) - stringio (3)
- strscan (4)
- time (3)
- tracer (1)
- tsort (1)
- un (1)
-
webrick
/ log (1) - win32ole (4)
- zlib (4)
クラス
-
ARGF
. class (5) - Array (12)
-
Benchmark
:: Tms (1) - CGI (1)
- CSV (3)
-
CSV
:: Row (1) - DateTime (3)
-
Encoding
:: Converter (5) - Enumerator (2)
-
Fiddle
:: Pointer (4) -
Gem
:: DependencyList (1) -
Gem
:: Package :: TarReader :: Entry (1) - IO (7)
-
IRB
:: Context (3) -
IRB
:: InputMethod (1) -
IRB
:: ReadlineInputMethod (2) -
IRB
:: StdioInputMethod (2) - Integer (4)
-
JSON
:: State (5) - MatchData (4)
- Matrix (3)
- Method (1)
- Module (3)
-
Net
:: FTP (4) - Numeric (1)
- Object (5)
-
OpenSSL
:: PKey :: EC :: Group (2) -
OpenSSL
:: PKey :: RSA (1) - Pathname (2)
- Proc (2)
-
Psych
:: SyntaxError (1) -
RDoc
:: Context (1) -
REXML
:: DocType (2) -
Rake
:: FileList (2) -
Resolv
:: DNS :: Name (1) -
RubyVM
:: InstructionSequence (3) - String (2)
- StringIO (3)
- StringScanner (4)
- Thread (1)
- Time (9)
- Tracer (1)
-
WEBrick
:: BasicLog (1) - WIN32OLE (1)
-
WIN32OLE
_ EVENT (1) -
WIN32OLE
_ METHOD (1) -
WIN32OLE
_ PARAM (1) -
Zlib
:: GzipReader (4)
モジュール
-
CGI
:: QueryExtension (1) -
Fiddle
:: Importer (1) - Kernel (7)
-
OpenSSL
:: Buffering (2) - TSort (1)
キーワード
- === (2)
- [] (3)
- []= (3)
- advise (1)
-
attribute
_ of (1) -
attributes
_ of (1) - autoload (1)
-
base
_ label (1) - begin (1)
-
beginning
_ of _ line? (1) - binwrite (1)
- bol? (1)
-
buffer
_ initial _ length (1) -
buffer
_ initial _ length= (1) -
check
_ circular? (1) -
check
_ signedness (2) -
check
_ sizeof (2) - chmod (1)
- chr (2)
- class (1)
- coerce (1)
- cofactor (2)
-
cofactor
_ expansion (1) - combination (2)
-
const
_ set (1) -
convertible
_ int (2) - curry (2)
-
defined
_ in? (1) - depth (1)
- depth= (1)
- digits (2)
- end (1)
- eof (6)
- eof? (9)
- fatal (1)
- fetch (3)
-
first
_ lineno (1) - format (1)
- getlocal (1)
-
gmt
_ offset (1) - gmtoff (1)
- httpdate (1)
-
ignore
_ eof (1) -
ignore
_ eof= (1) -
ignore
_ eof? (1) -
instance
_ of? (1) - ioflush (1)
- iqmp (1)
-
is
_ a? (2) -
kind
_ of? (2) - label (1)
-
laplace
_ expansion (1) - localtime (1)
-
new
_ offset (1) - off (1)
-
off
_ event (1) - offset (4)
-
offset
_ vtbl (1) - oflush (1)
-
ole
_ activex _ initialize (1) - output? (1)
- pack (1)
- permutation (2)
- pointer= (1)
- pos= (1)
-
primitive
_ convert (4) -
primitive
_ errinfo (1) - print (1)
-
readable
_ atfer _ eof? (3) - readbyte (1)
- readchar (2)
- readline (1)
-
repeated
_ combination (2) -
repeated
_ permutation (2) - retrbinary (2)
- rfc2822 (1)
- rfc822 (1)
- seek (4)
-
server
_ software (1) -
set
_ generator (1) - sizeof (1)
-
source
_ location (1) -
spec
_ predecessors (1) - storbinary (2)
- strftime (1)
-
subdomain
_ of? (1) - sysseek (1)
-
to
_ f (1) -
to
_ json (1) -
tsort
_ each _ child (1) - unpack (1)
-
utc
_ offset (1) -
with
_ index (2) - write (1)
検索結果
先頭5件
-
DateTime
# new _ offset(offset = 0) -> DateTime (18604.0) -
self を複製して、その時差を設定しなおします。 引数を省略した場合は、零 (協定世界時) になります。
self を複製して、その時差を設定しなおします。
引数を省略した場合は、零 (協定世界時) になります。
DateTime.new も参照してください。
@param offset 時差 -
Resolv
:: DNS :: Name # subdomain _ of?(other) -> bool (18415.0) -
other が self のサブドメインであるかどうかを返します。
other が self のサブドメインであるかどうかを返します。
//emlist[][ruby]{
require "resolv"
domain = Resolv::DNS::Name.create("y.z")
p Resolv::DNS::Name.create("w.x.y.z").subdomain_of?(domain) #=> true
p Resolv::DNS::Name.create("x.y.z").subdomain_of?(domain) #=> true
p Resolv::DNS::Name.create("y.z").subdomain_of?(domai... -
Object
# instance _ of?(klass) -> bool (18397.0) -
オブジェクトがクラス klass の直接のインスタンスである時真を返します。
オブジェクトがクラス klass の直接のインスタンスである時真を返します。
obj.instance_of?(c) が成立する時には、常に obj.kind_of?(c) も成立します。
@param klass Classかそのサブクラスのインスタンスです。
//emlist[][ruby]{
class C < Object
end
class S < C
end
obj = S.new
p obj.instance_of?(S) # true
p obj.instance_of?(C) # false
//}
@see Object#kind_of?... -
REXML
:: DocType # attribute _ of(element , attribute) -> String | nil (18379.0) -
DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。
DTD 内の属性リスト宣言で、 element という名前の要素の attribute という
名前の属性のデフォルト値を返します。
elementという名前の要素の属性値は宣言されていない、
elementという名前の要素にはattributeという名前の属性が宣言されていない、
もしくはデフォルト値が宣言されていない、のいずれかの場合は nil を返します。
@param element 要素名(文字列)
@param attribute 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Doc... -
REXML
:: DocType # attributes _ of(element) -> [REXML :: Attribute] (18361.0) -
DTD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている 属性の名前とデフォルト値を REXML::Attribute の配列で返します。
DTD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている
属性の名前とデフォルト値を REXML::Attribute の配列で返します。
名前とデフォルト値のペアは、各 Attribute オブジェクトの
REXML::Attribute#name と
REXML::Attribute#value で表現されます。
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (c... -
IRB
:: InputMethod # readable _ atfer _ eof? -> false (18352.0) -
入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。
入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。 -
IRB
:: ReadlineInputMethod # eof? -> bool (18352.0) -
入力が EOF(End Of File)に達したかどうかを返します。
入力が EOF(End Of File)に達したかどうかを返します。 -
IRB
:: ReadlineInputMethod # readable _ atfer _ eof? -> false (18352.0) -
入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。
入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。 -
IRB
:: StdioInputMethod # eof? -> bool (18352.0) -
入力が EOF(End Of File)に達したかどうかを返します。
入力が EOF(End Of File)に達したかどうかを返します。 -
IRB
:: StdioInputMethod # readable _ atfer _ eof? -> true (18352.0) -
入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。
入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。 -
StringScanner
# beginning _ of _ line? -> bool (18307.0) -
スキャンポインタが行頭を指しているなら true を、 行頭以外を指しているなら false を返します。
スキャンポインタが行頭を指しているなら true を、
行頭以外を指しているなら false を返します。
行頭の定義は、文字列先頭かまたは \n の直後を指していることです。
文字列末尾は必ずしも行頭ではありません。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new("test\nstring")
s.bol? # => true
s.scan(/\w+/)
s.bol? # => false
s.scan(/\n/)
s.bol? # => true
s.scan(/\w+/... -
ARGF
. class # eof -> bool (18304.0) -
現在開いているファイルがEOFに達したらtrueを返します。そうでない場合は falseを返します。
現在開いているファイルがEOFに達したらtrueを返します。そうでない場合は
falseを返します。
@raise IOError ファイルがopenされていない場合に発生します。
$ echo "eof" | ruby argf.rb
ARGF.eof? # => false
3.times { ARGF.readchar }
ARGF.eof? # => false
ARGF.readchar # => "\n"
ARGF.eof? # =... -
ARGF
. class # eof? -> bool (18304.0) -
現在開いているファイルがEOFに達したらtrueを返します。そうでない場合は falseを返します。
現在開いているファイルがEOFに達したらtrueを返します。そうでない場合は
falseを返します。
@raise IOError ファイルがopenされていない場合に発生します。
$ echo "eof" | ruby argf.rb
ARGF.eof? # => false
3.times { ARGF.readchar }
ARGF.eof? # => false
ARGF.readchar # => "\n"
ARGF.eof? # =... -
CGI
:: QueryExtension # server _ software -> String (18304.0) -
ENV['SERVER_SOFTWARE'] を返します。
ENV['SERVER_SOFTWARE'] を返します。 -
CSV
# eof -> bool (18304.0) -
IO#eof, IO#eof? に委譲します。
IO#eof, IO#eof? に委譲します。
@see IO#eof, IO#eof? -
CSV
# eof? -> bool (18304.0) -
IO#eof, IO#eof? に委譲します。
IO#eof, IO#eof? に委譲します。
@see IO#eof, IO#eof? -
DateTime
# offset -> Rational (18304.0) -
時差を返します。
時差を返します。 -
Fiddle
:: Importer # sizeof(t) -> Integer (18304.0) -
C における sizeof(t) の値を返します。
C における sizeof(t) の値を返します。
t が文字列の場合、その文字列が表す C の型の size が返されます。
例えば、sizeof("char") は 1 を返します。
sizeof("char*") は環境によって 4 や 8 といった値を返します。
Fiddle::Importer#struct で定義した
構造体クラスを渡すと、その構造体のサイズを返します。
Fiddle::Importer#union で定義した共用体クラスも同様です。
t がクラスの場合、t が to_ptr というインスタンスメソッドを持っている
ならば t.size を返します。
それ... -
Gem
:: Package :: TarReader :: Entry # eof? -> bool (18304.0) -
自身を最後まで読み込んでいる場合は、真を返します。 そうでない場合は、偽を返します。
自身を最後まで読み込んでいる場合は、真を返します。
そうでない場合は、偽を返します。 -
IO
# eof -> bool (18304.0) -
ストリームがファイルの終端に達した場合、true を返します。そうでない場合、false を返します。
ストリームがファイルの終端に達した場合、true を返します。そうでない場合、false を返します。
f = File.new("testfile")
dummy = f.readlines
f.eof #=> true
自身がパイプやソケットなどのストリームであった場合、相手がデータを送るか close するまでブロックします。
r, w = IO.pipe
Thread.new { sleep 10; w.close }
r.eof? #=> 10秒ブロックしてから true を返す。
r, w = IO.pipe
Thre... -
IO
# eof? -> bool (18304.0) -
ストリームがファイルの終端に達した場合、true を返します。そうでない場合、false を返します。
ストリームがファイルの終端に達した場合、true を返します。そうでない場合、false を返します。
f = File.new("testfile")
dummy = f.readlines
f.eof #=> true
自身がパイプやソケットなどのストリームであった場合、相手がデータを送るか close するまでブロックします。
r, w = IO.pipe
Thread.new { sleep 10; w.close }
r.eof? #=> 10秒ブロックしてから true を返す。
r, w = IO.pipe
Thre... -
IO
# ioflush -> self (18304.0) -
カーネルの入出力バッファをフラッシュします。
カーネルの入出力バッファをフラッシュします。
@return 自身を返します。 -
IO
# oflush -> self (18304.0) -
カーネルの出力バッファをフラッシュします。
カーネルの出力バッファをフラッシュします。
@return 自身を返します。 -
IRB
:: Context # ignore _ eof -> bool (18304.0) -
Ctrl-D(EOF) が入力された時に irb を終了するかどうかを返します。
Ctrl-D(EOF) が入力された時に irb を終了するかどうかを返します。
true の時は Ctrl-D を無視します。false の時は irb を終了します。
デフォルト値は false です。
@see IRB::Context#ignore_eof= -
IRB
:: Context # ignore _ eof=(val) (18304.0) -
Ctrl-D(EOF) が入力された時に irb を終了するかどうかを val に設定します。
Ctrl-D(EOF) が入力された時に irb を終了するかどうかを val に設定します。
.irbrc ファイル中で IRB.conf[:IGNORE_EOF] を設定する事でも同様の操作が
行えます。
@param val true を指定した場合、 Ctrl-D を無視します。false を指定した
場合は Ctrl-D の入力時に irb を終了します。
@see IRB::Context#ignore_eof -
IRB
:: Context # ignore _ eof? -> bool (18304.0) -
Ctrl-D(EOF) が入力された時に irb を終了するかどうかを返します。
Ctrl-D(EOF) が入力された時に irb を終了するかどうかを返します。
true の時は Ctrl-D を無視します。false の時は irb を終了します。
デフォルト値は false です。
@see IRB::Context#ignore_eof= -
Kernel
# check _ sizeof(type , headers = nil) -> Integer | nil (18304.0) -
与えられた型のサイズを返します。
与えられた型のサイズを返します。
型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。
例えば、
require 'mkmf'
check_sizeof('mystruct') # => 12
である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。
@param type 検査したい型を指定します。
@param headers 追加のヘッダファイルを指定します。 -
Kernel
# check _ sizeof(type , headers = nil) { . . . } -> Integer | nil (18304.0) -
与えられた型のサイズを返します。
与えられた型のサイズを返します。
型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。
例えば、
require 'mkmf'
check_sizeof('mystruct') # => 12
である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。
@param type 検査したい型を指定します。
@param headers 追加のヘッダファイルを指定します。 -
MatchData
# offset(n) -> [Integer , Integer] | [nil , nil] (18304.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] (18304.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
# cofactor(row , column) -> Integer | Rational | Float (18304.0) -
(row, column)-余因子を返します。
(row, column)-余因子を返します。
各要素の型によって返り値が変わります。
@param row 行
@param column 列
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方でない場合に発生します。
@see Matrix#adjugate -
Matrix
# cofactor _ expansion(row: nil , column: nil) -> object | Integer | Rational | Float (18304.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]].... -
OpenSSL
:: Buffering # eof -> bool (18304.0) -
相手からの通信が終端に達したら true を返します。
相手からの通信が終端に達したら true を返します。
IO#eof? と同様です。 -
OpenSSL
:: Buffering # eof? -> bool (18304.0) -
相手からの通信が終端に達したら true を返します。
相手からの通信が終端に達したら true を返します。
IO#eof? と同様です。 -
OpenSSL
:: PKey :: EC :: Group # cofactor -> OpenSSL :: BN (18304.0) -
余因子を返します。
余因子を返します。
@raise OpenSSL::PKey::EC::Group::Error 余因子の取得に失敗した場合に発生します -
Psych
:: SyntaxError # offset -> Integer (18304.0) -
エラーが生じた位置の offset をバイト数で 返します。
エラーが生じた位置の offset をバイト数で
返します。
offset とは、
Psych::SyntaxError#line, Psych::SyntaxError#column
で指示される位置からの相対位置です。
この位置から 0 バイトの位置でエラーが発生することが多いため、
このメソッドはしばしば 0 を返します。 -
StringIO
# eof -> bool (18304.0) -
自身の pos が文字列の終端にあれば true を返します。そうでないなら false を返します。
自身の pos が文字列の終端にあれば true を返します。そうでないなら false を返します。 -
StringIO
# eof? -> bool (18304.0) -
自身の pos が文字列の終端にあれば true を返します。そうでないなら false を返します。
自身の pos が文字列の終端にあれば true を返します。そうでないなら false を返します。 -
Time
# gmt _ offset -> Integer (18304.0) -
協定世界時との時差を秒を単位とする数値として返します。
協定世界時との時差を秒を単位とする数値として返します。
地方時が協定世界時よりも進んでいる場合(アジア、オーストラリアなど)
には正の値、遅れている場合(アメリカなど)には負の値になります。
//emlist[地方時の場合][ruby]{
p Time.now.zone # => "JST"
p Time.now.utc_offset # => 32400
//}
タイムゾーンが協定世界時に設定されている場合は 0 を返します。
//emlist[協定世界時の場合][ruby]{
p Time.now.getgm.zone # => "UTC"
p Ti... -
Time
# gmtoff -> Integer (18304.0) -
協定世界時との時差を秒を単位とする数値として返します。
協定世界時との時差を秒を単位とする数値として返します。
地方時が協定世界時よりも進んでいる場合(アジア、オーストラリアなど)
には正の値、遅れている場合(アメリカなど)には負の値になります。
//emlist[地方時の場合][ruby]{
p Time.now.zone # => "JST"
p Time.now.utc_offset # => 32400
//}
タイムゾーンが協定世界時に設定されている場合は 0 を返します。
//emlist[協定世界時の場合][ruby]{
p Time.now.getgm.zone # => "UTC"
p Ti... -
Time
# utc _ offset -> Integer (18304.0) -
協定世界時との時差を秒を単位とする数値として返します。
協定世界時との時差を秒を単位とする数値として返します。
地方時が協定世界時よりも進んでいる場合(アジア、オーストラリアなど)
には正の値、遅れている場合(アメリカなど)には負の値になります。
//emlist[地方時の場合][ruby]{
p Time.now.zone # => "JST"
p Time.now.utc_offset # => 32400
//}
タイムゾーンが協定世界時に設定されている場合は 0 を返します。
//emlist[協定世界時の場合][ruby]{
p Time.now.getgm.zone # => "UTC"
p Ti... -
Tracer
# off -> () (18304.0) -
トレース出力を中断します。
トレース出力を中断します。 -
WIN32OLE
_ EVENT # off _ event(event = nil) -> () (18304.0) -
WIN32OLE_EVENT#on_eventで登録したブロックを解除します。
WIN32OLE_EVENT#on_eventで登録したブロックを解除します。
@param event 文字列またはシンボルで登録時に指定したイベント名を指定しま
す。nilの場合、WIN32OLE_EVENT#on_eventに対してnilを指定したブロッ
クを解除します。
ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents')
ev.on_event(:NavigateComplete) {|url| puts url }
...
ev.off_event(:NavigateComplete) -
WIN32OLE
_ METHOD # offset _ vtbl -> Integer (18304.0) -
このメソッドのVTBLのオフセットを取得します。
このメソッドのVTBLのオフセットを取得します。
VTBLはC++やCでメソッドを呼び出すために利用する関数ポインタのテーブルです。
@return メソッドのVTBL上のオフセットを返します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Workbooks')
method = WIN32OLE_METHOD.new(tobj, 'Add')
puts method.offset_vtbl # => 40 -
Zlib
:: GzipReader # eof -> bool (18304.0) -
圧縮データの終端に達した場合真を返します。 フッターが読み込まれていなくても真を返すことに注意して下さい。
圧縮データの終端に達した場合真を返します。
フッターが読み込まれていなくても真を返すことに注意して下さい。
require 'zlib'
=begin
# hoge.gz がない場合はこれで作成する。
Zlib::GzipWriter.open('hoge.gz') { |gz|
gz.puts 'hoge'
gz.puts 'fuga'
gz.puts 'foga'
}
=end
Zlib::GzipReader.open('hoge.gz'){|gz|
gz.each_line{|line|
puts line... -
Zlib
:: GzipReader # eof? -> bool (18304.0) -
圧縮データの終端に達した場合真を返します。 フッターが読み込まれていなくても真を返すことに注意して下さい。
圧縮データの終端に達した場合真を返します。
フッターが読み込まれていなくても真を返すことに注意して下さい。
require 'zlib'
=begin
# hoge.gz がない場合はこれで作成する。
Zlib::GzipWriter.open('hoge.gz') { |gz|
gz.puts 'hoge'
gz.puts 'fuga'
gz.puts 'foga'
}
=end
Zlib::GzipReader.open('hoge.gz'){|gz|
gz.each_line{|line|
puts line... -
Object
# kind _ of?(mod) -> bool (9325.0) -
オブジェクトが指定されたクラス mod かそのサブクラスのインスタンスであるとき真を返します。
オブジェクトが指定されたクラス mod かそのサブクラスのインスタンスであるとき真を返します。
また、オブジェクトがモジュール mod をインクルードしたクラスかそのサブクラス
のインスタンスである場合にも真を返します。
Module#includeだけではなく、Object#extendやModule#prependに
よってサブクラスのインスタンスになる場合も含みます。
上記のいずれでもない場合に false を返します。
@param mod クラスやモジュールなど、Moduleかそのサブクラスのインスタンスです。
//emlist[][ruby]{
module M
end
c... -
Rake
:: FileList # kind _ of?(klass) -> bool (9307.0) -
自身に Array のフリをさせます。
自身に Array のフリをさせます。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.is_a?(Array) # => true
file_list.is_a?(String) # => false
end
//} -
StringScanner
# bol? -> bool (9007.0) -
スキャンポインタが行頭を指しているなら true を、 行頭以外を指しているなら false を返します。
スキャンポインタが行頭を指しているなら true を、
行頭以外を指しているなら false を返します。
行頭の定義は、文字列先頭かまたは \n の直後を指していることです。
文字列末尾は必ずしも行頭ではありません。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new("test\nstring")
s.bol? # => true
s.scan(/\w+/)
s.bol? # => false
s.scan(/\n/)
s.bol? # => true
s.scan(/\w+/... -
Matrix
# laplace _ expansion(row: nil , column: nil) -> object | Integer | Rational | Float (9004.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]].... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol (322.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 (322.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 , options) -> Symbol (322.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
ARGF
. class # seek(offset , whence = IO :: SEEK _ SET) -> 0 (304.0) -
ARGFが現在開いているファイルのファイルポインタを whence の位置から offset だけ移動させます。 offset 位置への移動が成功すれば 0 を返します。
ARGFが現在開いているファイルのファイルポインタを whence の位置から
offset だけ移動させます。 offset 位置への移動が成功すれば 0 を返します。
@param offset ファイルポインタを移動させるオフセットを整数で指定します。
@param whence IO#seek を参照。
@see IO#seek -
CSV
# seek(offset , whence = IO :: SEEK _ SET) -> 0 (304.0) -
IO#seek に委譲します。
IO#seek に委譲します。
@see IO#seek -
CSV
:: Row # []=(header , offset , value) (304.0) -
ヘッダの名前でフィールドを探し、値をセットします。
ヘッダの名前でフィールドを探し、値をセットします。
@param header ヘッダの名前を指定します。
@param offset このインデックスより後で、ヘッダの名前を探します。
重複しているヘッダがある場合に便利です。
@param value 値を指定します。
@see CSV::Row#field -
Enumerator
# with _ index(offset = 0) -> Enumerator (304.0) -
生成時のパラメータに従って、要素にインデックスを添えて繰り返します。 インデックスは offset から始まります。
生成時のパラメータに従って、要素にインデックスを添えて繰り返します。
インデックスは offset から始まります。
ブロックを指定した場合の戻り値は生成時に指定したレシーバ自身です。
//emlist[例][ruby]{
str = "xyz"
enum = Enumerator.new {|y| str.each_byte {|b| y << b }}
enum.with_index {|byte, idx| p [byte, idx] }
# => [120, 0]
# [121, 1]
# [122, 2]
require "stringi... -
Enumerator
# with _ index(offset = 0) {|(*args) , idx| . . . } -> object (304.0) -
生成時のパラメータに従って、要素にインデックスを添えて繰り返します。 インデックスは offset から始まります。
生成時のパラメータに従って、要素にインデックスを添えて繰り返します。
インデックスは offset から始まります。
ブロックを指定した場合の戻り値は生成時に指定したレシーバ自身です。
//emlist[例][ruby]{
str = "xyz"
enum = Enumerator.new {|y| str.each_byte {|b| y << b }}
enum.with_index {|byte, idx| p [byte, idx] }
# => [120, 0]
# [121, 1]
# [122, 2]
require "stringi... -
Fiddle
:: Pointer # [](offset) -> Integer (304.0) -
自身の指すアドレスに offset バイトを足したメモリ領域の先頭を整数として返します。
自身の指すアドレスに offset バイトを足したメモリ領域の先頭を整数として返します。
@param offset 値を得たい領域のアドレスまでのオフセット
@raise Fiddle::DLError self の保持するポインタが NULL である場合に発生します
例:
require 'fiddle'
s = 'abc'
cptr = Fiddle::Pointer[s]
p cptr[0] #=> 97
p cptr[1] #=> 98 -
Fiddle
:: Pointer # [](offset , len) -> String (304.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'
... -
Fiddle
:: Pointer # []=(offset , len , v) (304.0) -
自身の指すアドレスに offset バイトを足したメモリ領域の先頭 len バイトに 文字列 v をコピーします。
自身の指すアドレスに offset バイトを足したメモリ領域の先頭 len バイトに
文字列 v をコピーします。
str のサイズが len より小さい場合は、残りの領域を 0 で埋めます。
コピー先の領域が len より大きいか検証しません。
@param offset 書き換えたいメモリ領域のオフセットを整数で与えます。
@param len 書き換えたいメモリ領域のサイズを整数で指定します。
@param v メモリ領域にセットしたいバイト列を文字列で指定します。
@raise Fiddle::DLError self の保持するポインタが NULL である場合に発生します... -
Fiddle
:: Pointer # []=(offset , n) (304.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" -
IO
# advise(advice , offset=0 , len=0) -> nil (304.0) -
posix_fadvise(2) を呼びだし、 ファイルへのアクセスパターンをOSに知らせます。
posix_fadvise(2) を呼びだし、
ファイルへのアクセスパターンをOSに知らせます。
advice には以下のいずれかのシンボルを指定します。
* :normal - デフォルト
* :sequential - データは前から順にアクセスされる
* :random - データはランダムアクセスされる
* :willneed - データはこの直後にアクセスされる
* :dontneed - データは直後にはアクセスしない
* :noreuse - データは一度しかアクセスされない
これらの advice が具体的に何をするのかはプラットフォーム依存です。
... -
IO
# seek(offset , whence = IO :: SEEK _ SET) -> 0 (304.0) -
ファイルポインタを whence の位置から offset だけ移動させます。 offset 位置への移動が成功すれば 0 を返します。
ファイルポインタを whence の位置から offset だけ移動させます。
offset 位置への移動が成功すれば 0 を返します。
@param offset ファイルポインタを移動させるオフセットを整数で指定します。
@param whence 値は以下のいずれかです。
それぞれ代わりに :SET、:CUR、:END、:DATA、:HOLE を指定す
る事も可能です。
* IO::SEEK_SET: ファイルの先頭から (デフォルト)
* IO::SEEK_CUR: 現在のファイルポインタから
* IO::SE... -
IO
# sysseek(offset , whence = IO :: SEEK _ SET) -> Integer (304.0) -
lseek(2) と同じです。IO#seek では、 IO#sysread, IO#syswrite と併用すると正しく動作しないので代わりにこのメソッドを使います。 位置 offset への移動が成功すれば移動した位置(ファイル先頭からのオフセット)を返します。
lseek(2) と同じです。IO#seek では、
IO#sysread, IO#syswrite と併用すると正しく動作しないので代わりにこのメソッドを使います。
位置 offset への移動が成功すれば移動した位置(ファイル先頭からのオフセット)を返します。
書き込み用にバッファリングされた IO に対して実行すると警告が出ます。
File.open("/dev/zero") {|f|
buf = f.read(3)
f.sysseek(0)
}
# => -:3:in `sysseek': sysseek for buffered IO (IOErro... -
Net
:: FTP # retrbinary(cmd , blocksize , rest _ offset = nil) -> nil (304.0) -
サーバーに cmd で指定されたコマンドを送り、バイナリデータを 取り寄せます。
サーバーに cmd で指定されたコマンドを送り、バイナリデータを
取り寄せます。
blocksize で指定されたバイト単位でデータを
読み込み、ブロックに渡します。
rest_offset が省略されなかった場合は、cmdを送る前に
REST コマンドを送り、指定したバイト数の位置から
転送を開始します。
@param cmd コマンドを文字列で与えます。
@param blocksize 読み込み単位をバイト単位で与えます。
@param rest_offset REST コマンドに与えるオフセットを与えます。
@raise Net::FTPTempError 応答コードが 4... -
Net
:: FTP # retrbinary(cmd , blocksize , rest _ offset = nil) {|data| . . . } -> nil (304.0) -
サーバーに cmd で指定されたコマンドを送り、バイナリデータを 取り寄せます。
サーバーに cmd で指定されたコマンドを送り、バイナリデータを
取り寄せます。
blocksize で指定されたバイト単位でデータを
読み込み、ブロックに渡します。
rest_offset が省略されなかった場合は、cmdを送る前に
REST コマンドを送り、指定したバイト数の位置から
転送を開始します。
@param cmd コマンドを文字列で与えます。
@param blocksize 読み込み単位をバイト単位で与えます。
@param rest_offset REST コマンドに与えるオフセットを与えます。
@raise Net::FTPTempError 応答コードが 4... -
Net
:: FTP # storbinary(cmd , file , blocksize , rest _ offset = nil) -> nil (304.0) -
サーバーに cmd で指定されたコマンドを送り、バイナリデータを 送ります。
サーバーに cmd で指定されたコマンドを送り、バイナリデータを
送ります。
送るデータは IO のインスタンスを
file で指定します。
(実際には StringIO のような IO とメソッドレベルで
互換するオブジェクトであればなんでもかまいません)。
blocksize で指定されたバイト単位で file からデータを読みこみ、
サーバに送ります。
rest_offset が省略されなかった場合は、cmdを送る前に
REST コマンドを送り、指定したバイト数の位置から
転送を開始します。
ブロックが指定された場合には、転送するデータを blocksize ごとに
ブロックに... -
Net
:: FTP # storbinary(cmd , file , blocksize , rest _ offset = nil) {|data| . . . } -> nil (304.0) -
サーバーに cmd で指定されたコマンドを送り、バイナリデータを 送ります。
サーバーに cmd で指定されたコマンドを送り、バイナリデータを
送ります。
送るデータは IO のインスタンスを
file で指定します。
(実際には StringIO のような IO とメソッドレベルで
互換するオブジェクトであればなんでもかまいません)。
blocksize で指定されたバイト単位で file からデータを読みこみ、
サーバに送ります。
rest_offset が省略されなかった場合は、cmdを送る前に
REST コマンドを送り、指定したバイト数の位置から
転送を開始します。
ブロックが指定された場合には、転送するデータを blocksize ごとに
ブロックに... -
OpenSSL
:: PKey :: EC :: Group # set _ generator(generator , order , cofactor) -> self (304.0) -
群のパラメータを設定します。
群のパラメータを設定します。
@param generator 生成元(OpenSSL::PKey::EC::Point オブジェクト)
@param order 生成元の位数(OpenSSL::BN オブジェクト)
@param cofactor 余因子OpenSSL::BN オブジェクト
@raise OpenSSL::PKey::EC::Group::Error 設定に失敗した場合に発生します -
Pathname
# binwrite(string , offset=nil) -> Integer (304.0) -
IO.binwrite(self.to_s, *args)と同じです。
IO.binwrite(self.to_s, *args)と同じです。
@see IO.binwrite -
Pathname
# write(string , offset=nil , **opts) -> Integer (304.0) -
IO.write(self.to_s, string, offset, **opts)と同じです。
@see IO.write -
StringIO
# seek(offset , whence = IO :: SEEK _ SET) -> 0 (304.0) -
自身の pos を whence の位置から offset バイトだけ移動させます。
自身の pos を whence の位置から offset バイトだけ移動させます。
@param offset 移動させたいバイト数を整数で指定します。
@param whence 以下のいずれかの定数を指定します。
* IO::SEEK_SET: ファイルの先頭から (デフォルト)
* IO::SEEK_CUR: 現在のファイルポインタから
* IO::SEEK_END: ファイルの末尾から
@raise Errno::EINVAL offset + whence がマイナスである場合に発生します。
@raise ArgumentError whence が上の SEE... -
Time
# getlocal(utc _ offset) -> Time (304.0) -
タイムゾーンを地方時に設定した Time オブジェクトを新しく生成 して返します。
タイムゾーンを地方時に設定した Time オブジェクトを新しく生成
して返します。
@param utc_offset タイムゾーンを地方時に設定する代わりに協定世界時との
時差を、秒を単位とする整数か、"+HH:MM" "-HH:MM" 形式
の文字列で指定します。
//emlist[][ruby]{
p t = Time.utc(2000,1,1,20,15,1) # => 2000-01-01 20:15:01 UTC
p t.utc? # => true
p... -
Time
# localtime(utc _ offset) -> self (304.0) -
タイムゾーンを地方時に設定します。
タイムゾーンを地方時に設定します。
このメソッドを呼び出した後は時刻変換を協定地方時として行ないます。
@param utc_offset タイムゾーンを地方時に設定する代わりに協定世界時との
時差を、秒を単位とする整数か、"+HH:MM" "-HH:MM" 形式
の文字列で指定します。
Time#localtime, Time#gmtime の挙動はシステムの
localtime(3) の挙動に依存します。Time クラ
スでは時刻を起算時からの経過秒数として保持していますが、ある特定の
時刻までの経過秒は、シス... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil (196.0) -
Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.
Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.
If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) { . . . } -> "signed" | "unsigned" | nil (196.0) -
Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.
Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.
If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS... -
Time
# strftime(format) -> String (148.0) -
時刻を format 文字列に従って文字列に変換した結果を返します。
時刻を format 文字列に従って文字列に変換した結果を返します。
@param format フォーマット文字列を指定します。使用できるものは 以下の通りです。
* %A: 曜日の名称(Sunday, Monday ... )
* %a: 曜日の省略名(Sun, Mon ... )
* %B: 月の名称(January, February ... )
* %b: 月の省略名(Jan, Feb ... )
* %C: 世紀 (2009年であれば 20)
* %c: 日付と時刻 (%a %b %e %T %Y)
* %D: 日付 (%m/%d/%y)
* ... -
Numeric
# coerce(other) -> [Numeric] (94.0) -
自身と other が同じクラスになるよう、自身か other を変換し [other, self] という配列にして返します。
自身と other が同じクラスになるよう、自身か other を変換し [other, self] という配列にして返します。
デフォルトでは self と other を Float に変換して [other, self] という配列にして返します。
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
以下は Rational の coerce のソースです。other が自身の知らない数値クラスであった場合、
super を呼んでいることに注意して下さい。
//emlist[例][ruby]{
# lib/rational.rb より
def co... -
Proc
# curry -> Proc (76.0) -
Procをカリー化します
Procをカリー化します
カリー化したProcはいくつかの引数をとります。十分な数の引数が与えられると、元のProcに引数を渡し
て実行し、結果を返します。引数の個数が足りないときは、部分適用したカリー化Procを返します。
@param arity 引数の個数を指定します
@return カリー化したProcオブジェクトを返します
//emlist[例][ruby]{
b = proc {|x, y, z| (x||0) + (y||0) + (z||0) }
p b.curry[1][2][3] #=> 6
p b.curry[1, 2][3, 4] ... -
Proc
# curry(arity) -> Proc (76.0) -
Procをカリー化します
Procをカリー化します
カリー化したProcはいくつかの引数をとります。十分な数の引数が与えられると、元のProcに引数を渡し
て実行し、結果を返します。引数の個数が足りないときは、部分適用したカリー化Procを返します。
@param arity 引数の個数を指定します
@return カリー化したProcオブジェクトを返します
//emlist[例][ruby]{
b = proc {|x, y, z| (x||0) + (y||0) + (z||0) }
p b.curry[1][2][3] #=> 6
p b.curry[1, 2][3, 4] ... -
Array
# pack(template) -> String (58.0) -
配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。
配列の内容を template で指定された文字列にしたがって、
バイナリとしてパックした文字列を返します。
テンプレートは
型指定文字列とその長さ(省略時は1)を並べたものです。長さと
して * が指定された時は「残りのデータ全て」の長さを
表します。型指定文字は以下で述べる pack テンプレート文字列の通りです。
@param template 自身のバイナリとしてパックするためのテンプレートを文字列で指定します。
以下にあげるものは、Array#pack、String#unpack
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」を表す数字
を続けることができま... -
Module
# ===(obj) -> bool (58.0) -
指定された obj が self かそのサブクラスのインスタンスであるとき真を返します。 また、obj が self をインクルードしたクラスかそのサブクラスのインスタンスである場合にも 真を返します。上記のいずれでもない場合に false を返します。
指定された obj が self かそのサブクラスのインスタンスであるとき真を返します。
また、obj が self をインクルードしたクラスかそのサブクラスのインスタンスである場合にも
真を返します。上記のいずれでもない場合に false を返します。
言い替えると obj.kind_of?(self) が true の場合、 true を返します。
このメソッドは主に case 文での比較に用いられます。
case ではクラス、モジュールの所属関係をチェックすることになります。
//emlist[例][ruby]{
str = String.new
case str
when St... -
Module
# autoload(const _ name , feature) -> nil (58.0) -
定数 const_name を最初に参照した時に feature を Kernel.#require するように設定します。
定数 const_name を最初に参照した時に feature を Kernel.#require するように設定します。
const_name が autoload 設定されていて、まだ定義されてない(ロードされていない)ときは、
autoload する対象を置き換えます。
const_name が(autoloadではなく)既に定義されているときは何もしません。
@param const_name String または Symbol で指定します。
なお、const_name には、"::" 演算子を含めることはできません。
つまり、self の直下に定... -
String
# unpack(template) -> Array (58.0) -
Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。
Array#pack で生成された文字列を
テンプレート文字列 template にしたがってアンパックし、
それらの要素を含む配列を返します。
@param template pack テンプレート文字列
@return オブジェクトの配列
以下にあげるものは、Array#pack、String#unpack
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」を表す数字
を続けることができます。「長さ」の代わりに`*'とすることで「残り全て」
を表すこともできます。
長さの意味はテンプレート文字により異なりますが大抵、
"iiii"
のよう... -
JSON
:: State # buffer _ initial _ length -> Integer (52.0) -
This integer returns the current initial length of the buffer.
This integer returns the current initial length of the buffer. -
JSON
:: State # buffer _ initial _ length=(length) (52.0) -
This sets the initial length of the buffer to length, if length > 0, otherwise its value isn't changed.
This sets the initial length of the buffer to length, if length > 0,
otherwise its value isn't changed. -
JSON
:: State # depth -> Integer (52.0) -
This integer returns the current depth of data structure nesting.
This integer returns the current depth of data structure nesting. -
JSON
:: State # depth=(depth) (52.0) -
This sets the maximum level of data structure nesting in the generated JSON to the integer depth, max_nesting = 0 if no maximum should be checked.
This sets the maximum level of data structure nesting in the generated
JSON to the integer depth, max_nesting = 0 if no maximum should be
checked. -
Kernel
# convertible _ int(type , headers = nil , opts = nil) (52.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) { . . . } (52.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... -
OpenSSL
:: PKey :: RSA # iqmp -> OpenSSL :: BN (52.0) -
鍵の coefficient (inverse of q mod p) です。
鍵の coefficient (inverse of q mod p) です。
秘密鍵の情報です。 -
RDoc
:: Context # defined _ in?(file) (52.0) -
Return true if at least part of this thing was defined in file
Return true if at least part of this thing was defined in file -
Array
# combination(n) -> Enumerator (40.0) -
サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。
サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。
得られる組み合わせの順序は保証されません。ブロックなしで呼び出されると、組み合わせ
を生成する Enumerator オブジェクトを返します。
@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[... -
Array
# combination(n) {|c| block } -> self (40.0) -
サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。
サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。
得られる組み合わせの順序は保証されません。ブロックなしで呼び出されると、組み合わせ
を生成する Enumerator オブジェクトを返します。
@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[... -
Array
# permutation(n = self . length) -> Enumerator (40.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
引数を省略した場合は配列の要素数と同じサイズの順列に対してブロックを実
行します。
得られる順列の順序は保証されません。ブロックなしで呼び出されると, 順列
を生成する Enumerator オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
... -
Array
# permutation(n = self . length) { |p| block } -> self (40.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
引数を省略した場合は配列の要素数と同じサイズの順列に対してブロックを実
行します。
得られる順列の順序は保証されません。ブロックなしで呼び出されると, 順列
を生成する Enumerator オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
... -
Benchmark
:: Tms # format(fmtstr = nil , *args) -> String (40.0) -
self を指定されたフォーマットで整形して返します。
self を指定されたフォーマットで整形して返します。
このメソッドは Kernel.#format のようにオブジェクトを整形しますが、
以下の拡張を使用することができます。
: %u
user CPU time で置き換えられます。Benchmark::Tms#utime
: %y
system CPU time で置き換えられます(Mnemonic: y of "s*y*stem")。Benchmark::Tms#stime
: %U
子プロセスの user CPU time で置き換えられます。Benchmark::Tms#cutime
: %Y
子プロセスの s... -
Gem
:: DependencyList # spec _ predecessors -> Hash (40.0) -
@todo ???
@todo ???
Return a hash of predecessors. <tt>result[spec]</tt> is an
Array of gemspecs that have a dependency satisfied by the named
spec. -
Object
# ===(other) -> bool (40.0) -
case 式で使用されるメソッドです。d:spec/control#case も参照してください。
case 式で使用されるメソッドです。d:spec/control#case も参照してください。
このメソッドは case 式での振る舞いを考慮して、
各クラスの性質に合わせて再定義すべきです。
デフォルトでは内部で Object#== を呼び出します。
when 節の式をレシーバーとして === を呼び出すことに注意してください。
また Enumerable#grep でも使用されます。
@param other 比較するオブジェクトです。
//emlist[][ruby]{
age = 12
# (0..2).===(12), (3..6).===(12), ... が実行...