ライブラリ
クラス
- CSV (11)
-
CSV
:: Table (11) - Data (8)
- DateTime (55)
- IO (55)
-
JSON
:: State (11) - Object (11)
-
Rake
:: PackageTask (11) -
RubyVM
:: InstructionSequence (11) -
Socket
:: Option (11) - Struct (12)
- SystemCallError (11)
- Thread (11)
- Time (55)
- Tracer (11)
- WIN32OLE (11)
モジュール
- FileUtils (11)
-
GC
:: Profiler (88) - Process (11)
- Psych (12)
-
RubyVM
:: AbstractSyntaxTree (8)
キーワード
- === (11)
- [] (7)
- binread (11)
- binwrite (11)
- civil (11)
- clear (11)
- commercial (11)
-
copy
_ stream (11) - disable (11)
- enable (11)
- enabled? (11)
- exec (11)
-
handle
_ interrupt (11) - httpdate (11)
- iso8601 (11)
- jd (11)
- linger (11)
- new (68)
- off (11)
-
ole
_ show _ help (11) - ordinal (11)
-
raw
_ data (11) - read (11)
- report (11)
- result (11)
- rfc2822 (11)
- rfc822 (11)
-
safe
_ load (12) -
total
_ time (11) - write (11)
- xmlschema (11)
-
yaml
_ tag (11)
検索結果
先頭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 - FileUtils
. options _ of(mid) -> Array
-
RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node (18275.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...ntaxTree.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
#......(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 "hell... -
RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (18275.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...ntaxTree.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
#......(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 "hell... -
RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node (18274.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...ntaxTree.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
#......(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 "hell... -
RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence (18238.0) -
引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。
...合
# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)
> # => <RubyVM::InstructionSequence:block in irb_binding@(irb)>
# method
> def foo(bar); puts bar; end
> RubyVM::InstructionSequence.of(method(:foo))
> # => <RubyVM::InstructionSequence:foo@(irb)>
例2: Ruby......str = 'a' + 'b' }
# irb
> require '/tmp/iseq_of.rb'
# hello メソッド
> RubyVM::InstructionSequence.of(method(:hello))
> # => #<RubyVM::InstructionSequence:0x007fb73d7cb1d0>
# グローバル proc
> RubyVM::InstructionSequence.of($a_global_proc)
> # => #<RubyVM::InstructionSeq... -
FileUtils
. options _ of(mid) -> Array (6208.0) -
与えられたメソッド名で使用可能なオプション名の配列を返します。
...与えられたメソッド名で使用可能なオプション名の配列を返します。
@param mid メソッド名を指定します。
//emlist[][ruby]{
require 'fileutils'
FileUtils.options_of(:rm) # => ["noop", "verbose", "force"]
//}... -
Tracer
. off -> nil (6201.0) -
トレース出力を中断します。 トレース出力を開始するには、Tracer.onを使用します。
トレース出力を中断します。
トレース出力を開始するには、Tracer.onを使用します。
@see Tracer.on -
GC
:: Profiler . raw _ data -> [Hash , . . . ] | nil (3107.0) -
GC のプロファイル情報を GC の発生ごとに Hash の配列 (:GC_INVOKE_TIME が早いもの順)で返します。GC::Profiler が有効になっ ていない場合は nil を返します。
...C_INVOKE_TIME が早いもの順)で返します。GC::Profiler が有効になっ
ていない場合は nil を返します。
例:
GC::Profiler.enable
GC.start
GC::Profiler.raw_data
# => [
{
:GC_TIME=>1.3000000000000858e-05,
:GC_INVOKE_TIME=>0.010634999999999999,......、GC_PROFILE_MORE_DETAIL を有効にして Ruby をビルドした場合、以下の
キーも参照できます。
* :GC_MARK_TIME
* :GC_SWEEP_TIME
* :ALLOCATE_INCREASE
* :ALLOCATE_LIMIT
* :HEAP_USE_SLOTS
* :HEAP_LIVE_OBJECTS
* :HEAP_FREE_OBJECTS
* :HAVE_FINALIZE
@see GC::Profiler.repor......t, GC::Profiler.result... -
GC
:: Profiler . result -> String (3107.0) -
GC のプロファイル情報をフォーマットし、文字列として返します。
...GC の発生ごとに集計します。
以下は、5 回 GC が発生した場合の実行例です。
$ ruby -e "GC::Profiler.enable; a = Array.new(100000){ 'aa' }; puts GC::Profiler.result"
GC 5 invokes.
Index Invoke Time(sec) Use Size(byte) Total Size(byte) Total Obje......Time
Ruby が起動してから GC が起動するまでに経過した時間
: Use Size
ヒープ内での使用サイズ
: Total Size
ヒープ全体のサイズ
: Total Object
ヒープ内に存在するオブジェクトの個数
: GC Time
GC の処理時間
@see GC::Profiler.report... -
GC
:: Profiler . clear -> nil (3101.0) -
蓄積している GC のプロファイル情報をすべて削除します。
...プロファイル情報をすべて削除します。
例:
GC::Profiler.enable
GC.start
GC.start
GC::Profiler.report #=> 2 回分の GC のプロファイル情報出力する。
GC::Profiler.clear
GC.start
GC::Profiler.report #=> 1 回分の GC のプロファイル情報出力す... -
GC
:: Profiler . disable -> nil (3101.0) -
GC のプロファイラを停止します。
...停止します。
例:
GC::Profiler.disable
GC::Profiler.enabled? #=> false
このメソッドでは、蓄積したプロファイル情報は破棄しません。
破棄したい場合は GC::Profiler.clear を呼び出してください。
@see GC::Profiler.enable, GC::Profiler.enabled?... -
GC
:: Profiler . enable -> nil (3101.0) -
GC のプロファイラを起動します。
...GC のプロファイラを起動します。
このメソッドを呼び出してから GC が発生すると、
GC についてプロファイル情報を取得します。
例:
GC::Profiler.enable
GC::Profiler.enabled? #=> true
@see GC::Profiler.disable, GC::Profiler.enabled?... -
GC
:: Profiler . enabled? -> bool (3101.0) -
GC のプロファイラを起動中であれば true、停止中であれば false を返します。
...プロファイラを起動中であれば true、停止中であれば false を返します。
例:
GC::Profiler.enabled? #=> false
GC::Profiler.enable
GC::Profiler.enabled? #=> true
GC::Profiler.disable
GC::Profiler.enabled? #=> false
@see GC::Profiler.enable, GC::Profiler.disable...