種類
ライブラリ
- ビルトイン (1157)
- benchmark (48)
-
cgi
/ core (12) - csv (72)
- date (76)
- etc (12)
- fiddle (48)
-
fiddle
/ import (12) - fileutils (24)
-
io
/ console (24) -
irb
/ context (36) - json (36)
-
json
/ add / date _ time (12) - logger (1)
- matrix (50)
-
minitest
/ spec (2) -
minitest
/ unit (2) - mkmf (24)
-
net
/ ftp (48) - objspace (24)
- observer (12)
- openssl (36)
- pathname (24)
- profiler (6)
- psych (26)
-
rake
/ packagetask (12) -
rexml
/ document (12) -
rubygems
/ dependency _ list (12) - socket (468)
- stringio (12)
- strscan (24)
- thwait (6)
- time (96)
- tracer (12)
- tsort (12)
- un (12)
-
webrick
/ log (12) - win32ole (60)
- zlib (24)
クラス
-
ARGF
. class (60) - Array (153)
-
Benchmark
:: Tms (24) - CGI (12)
- CSV (48)
-
CSV
:: Row (12) -
CSV
:: Table (12) - Data (15)
- Date (2)
- DateTime (86)
- Encoding (48)
-
Encoding
:: Converter (60) -
Enumerator
:: Lazy (12) -
Fiddle
:: Pointer (48) -
Gem
:: DependencyList (12) - IO (160)
-
IRB
:: Context (36) - Integer (48)
-
JSON
:: State (12) - MatchData (56)
- Matrix (36)
- Method (12)
- Module (36)
-
Net
:: FTP (48) - Numeric (12)
- Object (74)
-
OpenSSL
:: PKey :: EC :: Group (24) - Pathname (24)
- Proc (24)
-
REXML
:: DocType (12) -
Rake
:: PackageTask (12) -
RubyVM
:: InstructionSequence (36) - Socket (228)
-
Socket
:: Option (12) - String (30)
- StringIO (12)
- StringScanner (24)
- Struct (22)
- Symbol (12)
- SystemCallError (12)
- Thread (24)
- Time (134)
- Tracer (12)
- Vector (14)
-
WEBrick
:: BasicLog (12) - WIN32OLE (24)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ METHOD (12) -
WIN32OLE
_ PARAM (12) -
Zlib
:: GzipReader (24)
モジュール
- Benchmark (24)
- Etc (12)
-
Fiddle
:: Importer (12) - FileUtils (24)
-
GC
:: Profiler (72) - JSON (24)
- Kernel (121)
-
MiniTest
:: Assertions (2) - ObjectSpace (72)
-
OpenSSL
:: ASN1 (12) - Process (12)
-
Profiler
_ _ (6) - Psych (14)
-
RubyVM
:: AbstractSyntaxTree (10) -
Socket
:: Constants (228) - TSort (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - === (36)
- Application (1)
- ArgumentError (12)
- ErrNoFinishedThread (6)
- FORMAT (24)
-
IPV6
_ RTHDR (24) -
IPV6
_ RTHDRDSTOPTS (24) -
IP
_ MTU (24) -
IP
_ ROUTER _ ALERT (24) -
IP
_ TOS (24) -
MSG
_ COMPAT (24) -
MSG
_ EOF (24) -
MSG
_ FLUSH (24) -
MSG
_ OOB (24) - Marshal フォーマット (12)
-
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) -
NI
_ NOFQDN (24) - Observable (12)
- Profiler (12)
- Ruby用語集 (12)
-
SJIS
_ SOFTBANK (12) -
SJIS
_ SoftBank (12) -
SO
_ BROADCAST (24) -
SO
_ OOBINLINE (24) -
SO
_ PEERCRED (24) -
SO
_ PEERNAME (24) -
TCP
_ KEEPCNT (24) -
TCP
_ LINGER2 (24) -
TCP
_ NOPUSH (24) -
TCP
_ SYNCNT (24) -
TCP
_ WINDOW _ CLAMP (24) -
UTF8
_ SOFTBANK (12) -
UTF8
_ SoftBank (12) - [] (46)
- []= (50)
- advise (12)
-
assert
_ instance _ of (1) -
assert
_ kind _ of (1) -
attribute
_ of (12) - autoload (24)
- autoload? (12)
-
base
_ label (12) - begin (12)
- benchmark (12)
- binread (12)
- binwrite (24)
- byteindex (3)
- byteoffset (6)
- byterindex (3)
-
check
_ sizeof (24) - chmod (12)
- chr (24)
- civil (12)
- class (12)
- coerce (12)
- cofactor (24)
-
cofactor
_ expansion (12) - combination (24)
- commercial (12)
-
const
_ set (12) -
copy
_ stream (12) - curry (24)
-
deconstruct
_ keys (17) - digits (24)
- disable (12)
-
each
_ object (48) - enable (12)
- enabled? (12)
- end (12)
-
end
_ with? (6) - eof (36)
- eof? (36)
- exec (12)
- fatal (12)
- fetch (36)
- format (12)
- generate (12)
- getlocal (12)
- gets (12)
-
handle
_ interrupt (12) - httpdate (24)
-
ignore
_ eof (12) -
ignore
_ eof= (12) -
ignore
_ eof? (12) -
instance
_ of? (12) - ioflush (12)
-
is
_ a? (12) - iso8601 (12)
- jd (12)
-
kind
_ of? (12) - label (12)
- lambda (18)
-
laplace
_ expansion (12) - linger (12)
- localtime (12)
-
memsize
_ of (12) -
memsize
_ of _ all (12) -
must
_ be _ instance _ of (1) -
must
_ be _ kind _ of (1) -
net
/ smtp (12) - new (78)
-
new
_ offset (12) - off (12)
-
off
_ event (12) - offset (24)
-
offset
_ vtbl (12) - oflush (12)
-
ole
_ activex _ initialize (12) -
ole
_ show _ help (12) - ordinal (12)
- output? (12)
- pack (21)
- pack テンプレート文字列 (12)
- permutation (24)
- pointer= (12)
- pos= (12)
- pread (8)
-
primitive
_ convert (48) -
primitive
_ errinfo (12) - print (12)
-
print
_ profile (6) - proc (19)
- pwrite (8)
-
raw
_ data (12) -
rb
_ time _ timespec _ new (10) -
rdoc
/ generator / json _ index (12) - read (12)
- readbyte (12)
- readchar (24)
- readline (24)
-
remove
_ entry _ secure (12) -
repeated
_ combination (24) -
repeated
_ permutation (24) - report (12)
- result (12)
- retrbinary (24)
- rfc2822 (24)
- rfc822 (24)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
rubygems
/ security (12) -
safe
_ load (14) - seek (48)
-
set
_ generator (12) - sizeof (12)
-
source
_ location (12) -
spec
_ predecessors (12) -
start
_ with? (6) - storbinary (24)
- strftime (12)
- sysconf (12)
- sysseek (12)
-
test
/ unit (1) -
to
_ f (12) -
to
_ json (12) - traverse (12)
-
tsort
_ each _ child (12) - unpack (12)
- unparse (12)
-
with
_ index (12) - write (24)
- xmlschema (12)
-
yaml
_ tag (12) - クラス/メソッドの定義 (12)
- パターンマッチ (12)
- 変数と定数 (4)
検索結果
先頭5件
- RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence - Profiler
_ _ . # print _ profile(file) -> ()
-
RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node (18198.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...では動作しません。
@param proc Procもしくはメソッドオブジェクトを指定します。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコードのテキストを取得できます。
@param keep_tokens true を......きます。
@param error_tolerant true を指定すると、構文エラーが発生した際にエラー箇所を type が :ERROR であるようなノードに置き換えてツリーを生成します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
#......gs: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))
def hello
puts "hello, world"
end
pp RubyVM::AbstractSyntaxTree.of(method(:hello))
# => (SCOPE@5:0-7:3
# tbl: []
# args:
# (ARGS@5:9-5:9
# pre_num: 0
#... -
RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (18198.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...では動作しません。
@param proc Procもしくはメソッドオブジェクトを指定します。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコードのテキストを取得できます。
@param keep_tokens true を......きます。
@param error_tolerant true を指定すると、構文エラーが発生した際にエラー箇所を type が :ERROR であるようなノードに置き換えてツリーを生成します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
#......gs: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))
def hello
puts "hello, world"
end
pp RubyVM::AbstractSyntaxTree.of(method(:hello))
# => (SCOPE@5:0-7:3
# tbl: []
# args:
# (ARGS@5:9-5:9
# pre_num: 0
#... -
RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node (18179.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...。
@param proc Procもしくはメソッドオブジェクトを指定します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2......:44 2) nil)))
def hello
puts "hello, world"
end
pp RubyVM::AbstractSyntaxTree.of(method(:hello))
# => (SCOPE@5:0-7:3
# tbl: []
# args:
# (ARGS@5:9-5:9
# pre_num: 0
# pre_init: nil
# opt: nil
# first_post: nil
# post_num: 0
# post_init: nil......# rest: nil
# kw: nil
# kwrest: nil
# block: nil)
# body:
# (FCALL@6:2-6:21 :puts (LIST@6:7-6:21 (STR@6:7-6:21 "hello, world") nil)))
//}... -
RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence (18143.0) -
引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。
...を作成して返します。
@param body Proc、Method オブジェクトを指定します。
例1:irb で実行した場合
# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)
> # => <RubyVM::InstructionSequence:block in irb_binding@(irb)>
# method
> def foo(bar......onSequence.of(method(:foo))
> # => <RubyVM::InstructionSequence:foo@(irb)>
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/iseq_of.rb
def hello
puts "hello, world"
end
$a_global_proc = proc { str = 'a' + 'b' }
# irb
> require '/tmp/iseq_of.rb'
# h......ello メソッド
> RubyVM::InstructionSequence.of(method(:hello))
> # => #<RubyVM::InstructionSequence:0x007fb73d7cb1d0>
# グローバル proc
> RubyVM::InstructionSequence.of($a_global_proc)
> # => #<RubyVM::InstructionSequence:0x007fb73d7caf78>... -
Profiler
_ _ . # print _ profile(file) -> () (9106.0) -
stop_profile を実行し、プロファイルの結果を file に出力します。 file には printf メソッドが定義されていなければいけません。
...stop_profile を実行し、プロファイルの結果を file に出力します。
file には printf メソッドが定義されていなければいけません。
@param file File のインスタンスを指定します。... -
DateTime
# new _ offset(offset = 0) -> DateTime (6206.0) -
self を複製して、その時差を設定しなおします。 引数を省略した場合は、零 (協定世界時) になります。
...self を複製して、その時差を設定しなおします。
引数を省略した場合は、零 (協定世界時) になります。
DateTime.new も参照してください。
@param offset 時差... -
MiniTest
:: Assertions # assert _ kind _ of(klass , object , message) -> true (6143.0) -
与えられたオブジェクトが与えられたクラスまたはそのサブクラスのインスタンス である場合、検査にパスしたことになります。
...ス
である場合、検査にパスしたことになります。
@param klass オブジェクトが所属することを期待するクラスを指定します。
@param object 任意のオブジェクトを指定します。
@param message 検査に失敗した場合に表示するメッセ......結果を使用します。
@raise MiniTest::Assertion 与えられたオブジェクトが与えられたクラスまたはそのサブクラスの
インスタンスではない場合に発生します。
@see Object#kind_of?, MiniTest::Assertions#assert_instance_of... -
Object
# instance _ of?(klass) -> bool (6143.0) -
オブジェクトがクラス klass の直接のインスタンスである時真を返します。
..._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?,Object#class... -
MiniTest
:: Assertions # assert _ instance _ of(klass , object , message = nil) -> true (6137.0) -
与えられたオブジェクトが与えられたクラスの直接のインスタンスである場合、検査にパスしたことになります。
...る場合、検査にパスしたことになります。
@param klass オブジェクトが直接のインタンスであることを期待するクラスを指定します。
@param object 任意のオブジェクトを指定します。
@param message 検査に失敗した場合に表示する......Proc#call した
結果を使用します。
@raise MiniTest::Assertion 与えられたオブジェクトが与えられたクラスの直接のインスタンスでない
場合に発生します。
@see Module#===, MiniTest::Assertions#assert_kind_of... -
REXML
:: DocType # attribute _ of(element , attribute) -> String | nil (6137.0) -
DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。
...れていない、
もしくはデフォルト値が宣言されていない、のいずれかの場合は nil を返します。
@param element 要素名(文字列)
@param attribute 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOC......title CDATA #REQUIRED
publisher CDATA "foobar publisher">
]>
EOS
p doctype.attribute_of("book", "publisher") # => "foobar publisher"
p doctype.attribute_of("bar", "foo") # => nil
p doctype.attribute_of("book", "baz") # => nil
p doctype.attribute_of("book", "title") # => nil
//}... -
Matrix
# cofactor _ expansion(row: nil , column: nil) -> object | Integer | Rational | Float (6130.0) -
row 行、もしくは column 列に関するラプラス展開をする。
...r[3, -2]
//}
@param row 行
@param column 列
@raise ArgumentError row と column を両方指定した、もしくは両方とも指定していない、場合に発生します
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方でない場合に発生します
@see Matrix#cofactor... -
Object
# must _ be _ instance _ of(klass) -> true (6125.0) -
自身が与えられたクラスのインスタンスである場合、検査にパスしたことになります。
...ンスである場合、検査にパスしたことになります。
@param klass 任意のクラスを指定します。
@raise MiniTest::Assertion 自身が与えられたクラスの直接のインスタンスでない場合に発生します。
@see MiniTest::Assertions#assert_instance_of... -
Object
# must _ be _ kind _ of(klass) -> true (6125.0) -
自身が与えられたクラスまたはそのサブクラスのインスタンス である場合、検査にパスしたことになります。
...なります。
@param klass 自身が所属することを期待するクラスを指定します。
@raise MiniTest::Assertion 自身が与えられたクラスまたはそのサブクラスのインスタンスではない場合に発生します。
@see MiniTest::Assertions#assert_kind_of... -
ObjectSpace
. # memsize _ of _ all(klass = nil) -> Integer (6125.0) -
すべての生存しているオブジェクトが消費しているメモリ使用量をバイト単位 で返します。
...すべての生存しているオブジェクトが消費しているメモリ使用量をバイト単位
で返します。
@param klass 指定したクラスのインスタンスのメモリ使用量を返します。省略
した場合はすべてのクラスのインスタンス......うな Ruby のコードで定義できます。
//emlist[例][ruby]{
def memsize_of_all klass = false
total = 0
ObjectSpace.each_object{|e|
total += ObjectSpace.memsize_of(e) if klass == false || e.kind_of?(klass)
}
total
end
//}
戻り値の内容は完全ではない事に注意し... -
Matrix
# cofactor(row , column) -> Integer | Rational | Float (6124.0) -
(row, column)-余因子を返します。
...(row, column)-余因子を返します。
各要素の型によって返り値が変わります。
@param row 行
@param column 列
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方でない場合に発生します。
@see Matrix#adjugate...