別のキーワード
ライブラリ
- ビルトイン (139)
- fileutils (12)
-
irb
/ context (12) -
irb
/ extend-command (12) -
irb
/ input-method (48) - json (12)
-
minitest
/ unit (1) - openssl (24)
-
shell
/ command-processor (6) -
syslog
/ logger (12) - win32ole (36)
クラス
- Enumerator (14)
-
IRB
:: Context (12) -
IRB
:: FileInputMethod (12) -
IRB
:: InputMethod (12) -
IRB
:: ReadlineInputMethod (12) -
IRB
:: StdioInputMethod (12) -
MiniTest
:: Unit :: TestCase (1) - NoMethodError (19)
-
OpenSSL
:: SSL :: SSLContext (24) - Regexp (24)
-
RubyVM
:: InstructionSequence (36) -
Shell
:: CommandProcessor (6) -
Syslog
:: Logger (12) - TracePoint (12)
- WIN32OLE (12)
-
WIN32OLE
_ METHOD (12) -
WIN32OLE
_ PARAM (12)
モジュール
オブジェクト
- main (24)
キーワード
-
collect
_ method (12) -
define
_ method (24) - disasm (12)
- disassemble (12)
-
irb
_ original _ method _ name (12) -
json
_ create (12) -
last
_ match (24) -
make
_ methods (12) -
method
_ added (6) - new (153)
- of (22)
-
ole
_ show _ help (12) -
test
_ methods (1)
検索結果
先頭5件
- OpenSSL
:: SSL :: SSLContext . new(ssl _ method) -> OpenSSL :: SSL :: SSLContext - RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence - RubyVM
:: InstructionSequence . disasm(body) -> String - RubyVM
:: InstructionSequence . disassemble(body) -> String - OpenSSL
:: SSL :: SSLContext . new -> OpenSSL :: SSL :: SSLContext
-
OpenSSL
:: SSL :: SSLContext . new(ssl _ method) -> OpenSSL :: SSL :: SSLContext (114.0) -
SSL コンテキストオブジェクトを生成します。
...SSL コンテキストオブジェクトを生成します。
ssl_method で利用するプロトコルの種類を文字列もしくは
シンボルで指定します。以下のいずれかが利用可能です。
* 'TLSv1' TLSv1サーバクライアント両用
* 'TLSv1_server' TLSv......効化して SSLv3 と TLSv1 の両方を有効化するためには
'SSLv23' を指定し、OpenSSL::SSL::SSLContext#options= で
OpenSSL::SSL::OP_NO_SSLv2 を指定します。
@param ssl_method プロトコルを表す文字列もしくはシンボル
@see OpenSSL::SSL::SSLContext#ssl_version=... -
RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence (41.0) -
引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。
...引数 body で指定した Proc、Method オブジェクトを元に
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param body Proc、Method オブジェクトを指定します。
例1:irb で実行した場合
# proc
> p = proc { num = 1 + 2 }
> RubyVM::In......structionSequence.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: RubyVM::InstructionSequence.compile_file を使用した場......end
$a_global_proc = proc { 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
:: InstructionSequence . disasm(body) -> String (31.0) -
引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。
...成した
RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字
列に変換して返します。
@param body Proc、Method オブジェクトを指定します。
例1:Proc オブジェクトを指定した場合
# /tmp/proc.rb
p = proc { num = 1 + 2 }
puts Rub......num, 0
0012 leave
例2:Method オブジェクトを指定した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
puts RubyVM::InstructionSequence.disasm(method(:hello))
出力:
== disasm: <RubyVM::InstructionSequence:hello@/tmp/method.rb>============
0000 trace... -
RubyVM
:: InstructionSequence . disassemble(body) -> String (31.0) -
引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。
...成した
RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字
列に変換して返します。
@param body Proc、Method オブジェクトを指定します。
例1:Proc オブジェクトを指定した場合
# /tmp/proc.rb
p = proc { num = 1 + 2 }
puts Rub......num, 0
0012 leave
例2:Method オブジェクトを指定した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
puts RubyVM::InstructionSequence.disasm(method(:hello))
出力:
== disasm: <RubyVM::InstructionSequence:hello@/tmp/method.rb>============
0000 trace... -
OpenSSL
:: SSL :: SSLContext . new -> OpenSSL :: SSL :: SSLContext (14.0) -
SSL コンテキストオブジェクトを生成します。
...SSL コンテキストオブジェクトを生成します。
ssl_method で利用するプロトコルの種類を文字列もしくは
シンボルで指定します。以下のいずれかが利用可能です。
* 'TLSv1' TLSv1サーバクライアント両用
* 'TLSv1_server' TLSv......効化して SSLv3 と TLSv1 の両方を有効化するためには
'SSLv23' を指定し、OpenSSL::SSL::SSLContext#options= で
OpenSSL::SSL::OP_NO_SSLv2 を指定します。
@param ssl_method プロトコルを表す文字列もしくはシンボル
@see OpenSSL::SSL::SSLContext#ssl_version=... -
WIN32OLE
. ole _ show _ help(obj , helpcontext = nil) -> () (13.0) -
WIN32OLEオブジェクトのヘルプファイルを表示します。
...ェクトまたはWIN32OLE_METHODオ
ブジェクト。直接ヘルプファイルのフルパス名を指定することも可
能です。
@param helpcontext obj引数にWIN32OLE_TYPEオブジェクトまたは
WIN32OLE_METHODオブジェクトを指定し... -
Regexp
. last _ match(nth) -> String | nil (7.0) -
整数 nth が 0 の場合、マッチした文字列を返します ($&)。それ以外では、nth 番目の括弧にマッチ した部分文字列を返します($1,$2,...)。 対応する括弧がない場合やマッチしなかった場合には nil を返し ます。
...例外 NoMethodError が発生します。
対して、last_match(1) は nil を返します。
//emlist[例][ruby]{
str = "This is Regexp"
/That is Regexp/ =~ str
p Regexp.last_match # => nil
begin
p Regexp.last_match[1] # 例外が発生する
rescue
puts $! # => undefined method `[]' for ni... -
RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node (7.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...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
#... -
RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (7.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...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
#... -
TracePoint
. new(*events) {|obj| . . . } -> TracePoint (7.0) -
新しい TracePoint オブジェクトを作成して返します。トレースを有効 にするには TracePoint#enable を実行してください。
...してください。
//emlist[例:irb で実行した場合][ruby]{
trace = TracePoint.new(:call) do |tp|
p [tp.lineno, tp.defined_class, tp.method_id, tp.event]
end
# => #<TracePoint:0x007f17372cdb20>
trace.enable
# => false
puts "Hello, TracePoint!"
# ...
# [69, IRB::Notifier::AbstractNoti... -
Enumerator
. new(size=nil) {|y| . . . } -> Enumerator (5.0) -
Enumerator オブジェクトを生成して返します。与えられたブロックは Enumerator::Yielder オブジェクトを 引数として実行されます。
Enumerator オブジェクトを生成して返します。与えられたブロックは Enumerator::Yielder オブジェクトを
引数として実行されます。
生成された Enumerator オブジェクトに対して each を呼ぶと、この生成時に指定されたブロックを
実行し、Yielder オブジェクトに対して << メソッドが呼ばれるたびに、
each に渡されたブロックが繰り返されます。
new に渡されたブロックが終了した時点で each の繰り返しが終わります。
このときのブロックの返り値が each の返り値となります。
@param size 生成する Enumerator...