別のキーワード
ライブラリ
クラス
-
IRB
:: InputMethod (11) -
IRB
:: ReadlineInputMethod (22) -
IRB
:: StdioInputMethod (22) - Method (11)
- Module (5)
- Proc (5)
-
RubyVM
:: InstructionSequence (44) - Thread (11)
- WIN32OLE (22)
-
WIN32OLE
_ METHOD (11) -
WIN32OLE
_ PARAM (11)
モジュール
- Kernel (35)
-
RubyVM
:: AbstractSyntaxTree (8)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - Application (1)
- Array (11)
- Extend (11)
- FalseClass (11)
- Float (11)
- Hash (11)
- Integer (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - NilClass (11)
- Object (11)
- Proc (11)
-
Profiler
_ _ (6) - Ruby用語集 (11)
- String (11)
- TrueClass (11)
- WeakRef (11)
- [] (11)
-
base
_ label (11) - eof? (22)
-
first
_ lineno (11) -
irb
/ completion (11) - label (11)
- lambda (17)
-
offset
_ vtbl (11) -
ole
_ activex _ initialize (11) -
ole
_ show _ help (11) - output? (11)
- proc (18)
- rdoc (11)
-
rdoc
/ parser / c (11) -
readable
_ atfer _ eof? (33) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby2
_ keywords (10) -
source
_ location (11) - xmlrpc (3)
- クラス/メソッドの定義 (11)
- 手続きオブジェクトの挙動の詳細 (11)
検索結果
先頭5件
- Method
# source _ location -> [String , Integer] | nil - RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence - 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
-
Method
# source _ location -> [String , Integer] | nil (21024.0) -
ソースコードのファイル名と行番号を配列で返します。
...@see Proc#source_location
//emlist[例][ruby]{
# ------- /tmp/foo.rb ---------
class Foo
def foo; end
end
# ----- end of /tmp/foo.rb ----
require '/tmp/foo'
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.source_location # => ["/tmp/foo.rb", 2]
method(:puts).source_location # => nil
//}... -
RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence (18177.0) -
引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。
...Proc、Method オブジェクトを元に
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param body Proc、Method オブジェクトを指定します。
例1:irb で実行した場合
# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)
>......uence:block in irb_binding@(irb)>
# method
> def foo(bar); puts bar; end
> RubyVM::InstructionSequence.of(method(:foo))
> # => <RubyVM::InstructionSequence:foo@(irb)>
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/iseq_of.rb
def hello
puts "hello, worl......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... -
RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node (18120.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...M::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... -
RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (18120.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...M::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... -
RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node (18119.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...M::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... -
WIN32OLE
_ METHOD # offset _ vtbl -> Integer (9118.0) -
このメソッドのVTBLのオフセットを取得します。
...出すために利用する関数ポインタのテーブルです。
@return メソッドのVTBL上のオフセットを返します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Workbooks')
method = WIN32OLE_METHOD.new(tobj, 'Add')
puts method.offset_vtbl # => 40... -
IRB
:: InputMethod # readable _ atfer _ eof? -> false (9116.0) -
入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。
...入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。... -
IRB
:: ReadlineInputMethod # eof? -> bool (9116.0) -
入力が EOF(End Of File)に達したかどうかを返します。
...入力が EOF(End Of File)に達したかどうかを返します。... -
IRB
:: ReadlineInputMethod # readable _ atfer _ eof? -> false (9116.0) -
入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。
...入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。... -
IRB
:: StdioInputMethod # eof? -> bool (9116.0) -
入力が EOF(End Of File)に達したかどうかを返します。
...入力が EOF(End Of File)に達したかどうかを返します。... -
IRB
:: StdioInputMethod # readable _ atfer _ eof? -> true (9116.0) -
入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。
...入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。... -
Profiler
_ _ (6012.0) -
プロファイラの実装です。 Profiler__.start_profile 実行から、Profiler__.stop_profile までの 区間の実行コードのプロファイルを取得します。
...ァイラの実装です。
Profiler__.start_profile 実行から、Profiler__.stop_profile までの
区間の実行コードのプロファイルを取得します。
以下の使用例を参照してください。
require 'profiler'
Profiler__.start_profile
require 'tk' # こ......のコードのプロファイルが測定される
Profiler__.print_profile(STDOUT)
# =>
% cumulative self self total
time seconds seconds calls ms/call ms/call name
51.64 1.10 1.10 3 366.67 776.67 Kernel.require
17.37......1 370.00 370.00 TclTkIp#initialize
8.92 1.66 0.19 514 0.37 0.37 Module#method_added
6.57 1.80 0.14 1 140.00 140.00 Profiler__.start_profile
4.23 1.89 0.09 15 6.00 10.67 Kernel.extend
3.29 1.96 0.07...