820件ヒット
[1-100件を表示]
(0.179秒)
別のキーワード
ライブラリ
- ビルトイン (257)
- csv (48)
- openssl (312)
- psych (48)
- rbconfig (12)
-
rexml
/ document (12) -
rubygems
/ defaults (12) - securerandom (8)
- strscan (12)
-
test
/ unit (1) - uri (98)
クラス
- CSV (48)
- Data (3)
- Dir (27)
-
Encoding
:: Converter (24) - File (36)
-
OpenSSL
:: ASN1 :: BMPString (24) -
OpenSSL
:: ASN1 :: BitString (24) -
OpenSSL
:: ASN1 :: GeneralString (24) -
OpenSSL
:: ASN1 :: GraphicString (24) -
OpenSSL
:: ASN1 :: IA5String (24) -
OpenSSL
:: ASN1 :: ISO64String (24) -
OpenSSL
:: ASN1 :: NumericString (24) -
OpenSSL
:: ASN1 :: OctetString (24) -
OpenSSL
:: ASN1 :: PrintableString (24) -
OpenSSL
:: ASN1 :: T61String (24) -
OpenSSL
:: ASN1 :: UTF8String (24) -
OpenSSL
:: ASN1 :: UniversalString (24) -
OpenSSL
:: ASN1 :: VideotexString (24) -
Psych
:: Visitors :: YAMLTree (12) -
REXML
:: Text (12) - Random (15)
- Regexp (24)
-
RubyVM
:: InstructionSequence (46) - StringScanner (12)
- Struct (48)
モジュール
-
GC
:: Profiler (12) - Gem (12)
- Psych (36)
- RbConfig (12)
-
RubyVM
:: AbstractSyntaxTree (10) - SecureRandom (8)
-
Test
:: Unit (1) - URI (98)
オブジェクト
- ENV (12)
キーワード
- [] (17)
-
absolute
_ path (12) - alphanumeric (8)
- basename (12)
- bytes (7)
-
compile
_ option (12) -
decode
_ www _ form _ component (12) - define (3)
- disasm (12)
- disassemble (12)
- dump (24)
-
dump
_ stream (12) - encode (7)
-
encode
_ www _ form _ component (12) - escape (7)
- extract (48)
- filter (24)
- glob (10)
- home (12)
- instance (24)
-
load
_ from _ binary _ extra _ data (10) - new (396)
- parse (10)
- quote (12)
- result (12)
-
ruby
_ engine (12) -
setup
_ argv (1) - split (12)
- store (12)
- union (12)
- unnormalize (12)
- urandom (8)
検索結果
先頭5件
- RbConfig
. ruby -> String - Gem
. ruby _ engine -> String - RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String - RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: AbstractSyntaxTree . parse(string , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node
-
RbConfig
. ruby -> String (30536.0) -
ruby コマンドのフルパスを返します。
...
ruby コマンドのフルパスを返します。... -
Gem
. ruby _ engine -> String (18536.0) -
Ruby処理系実装の種類を表す文字列を返します。
...
Ruby処理系実装の種類を表す文字列を返します。... -
RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String (18314.0) -
バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。
...埋め込まれたextra_dataを取り出します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary("extra_data")
RubyVM::InstructionSequence.load_from_binary_extra_data(binary) # => extra_data
//}
@see RubyVM::InstructionSequence#to_binary... -
RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node (15751.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
... string パースする対象の Ruby のコードを文字列で指定します。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコードのテキストを取得できます。
@param keep_tokens true を指定すると、 Node#t......r_tolerant true を指定すると、構文エラーが発生した際にエラー箇所を type が :ERROR であるようなノードに置き換えてツリーを生成します。
@raise SyntaxError string が Ruby のコードとして正しくない場合に発生します。
//emlist[][ruby]......pp RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# => (SCOPE@1:0-1:9
# tbl: [:x]
# args: nil
# body:
# (LASGN@1:0-1:9 :x
# (OPCALL@1:4-1:9 (LIT@1:4-1:5 1) :+ (LIST@1:8-1:9 (LIT@1:8-1:9 2) nil))))
pp RubyVM::AbstractSyntaxTree.parse("x = 1; p(x; y=2", error_tolerant: true)... -
RubyVM
:: AbstractSyntaxTree . parse(string , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (15751.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
... string パースする対象の Ruby のコードを文字列で指定します。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコードのテキストを取得できます。
@param keep_tokens true を指定すると、 Node#t......r_tolerant true を指定すると、構文エラーが発生した際にエラー箇所を type が :ERROR であるようなノードに置き換えてツリーを生成します。
@raise SyntaxError string が Ruby のコードとして正しくない場合に発生します。
//emlist[][ruby]......pp RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# => (SCOPE@1:0-1:9
# tbl: [:x]
# args: nil
# body:
# (LASGN@1:0-1:9 :x
# (OPCALL@1:4-1:9 (LIT@1:4-1:5 1) :+ (LIST@1:8-1:9 (LIT@1:8-1:9 2) nil))))
pp RubyVM::AbstractSyntaxTree.parse("x = 1; p(x; y=2", error_tolerant: true)... -
RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node (15750.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
...。
@param string パースする対象の Ruby のコードを文字列で指定します。
@raise SyntaxError string が Ruby のコードとして正しくない場合に発生します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# => (SCOPE@1:0-1:9
# tbl: [:x]
#......args: nil
# body:
# (LASGN@1:0-1:9 :x
# (OPCALL@1:4-1:9 (LIT@1:4-1:5 1) :+ (LIST@1:8-1:9 (LIT@1:8-1:9 2) nil))))
//}... -
RubyVM
:: InstructionSequence . compile _ option -> Hash (15125.0) -
命令シーケンスのコンパイル時のデフォルトの最適化オプションを Hash で返 します。
...//emlist[例][ruby]{
require "pp"
pp RubyVM::InstructionSequence.compile_option
# => {:inline_const_cache=>true,
# :peephole_optimization=>true,
# :tailcall_optimization=>false,
# :specialized_instruction=>true,
# :operands_unification=>true,
# :instructions_unification=>false,
# :stack_caching=>......false,
# :trace_instruction=>true,
# :frozen_string_literal=>false,
# :debug_frozen_string_literal=>false,
# :coverage_enabled=>true,
# :debug_level=>0}
//}
@see RubyVM::InstructionSequence.compile_option=... -
File
. absolute _ path(file _ name , dir _ string=nil) -> String (12421.0) -
file_name を絶対パスに変換した文字列を返します。
...す。
dir_string を渡した場合はそのディレクトリを基準とします。
File.expand_path と異なり、 file_name 先頭が "~" である場合
それは展開されません。普通のディレクトリ名として処理されます。
//emlist[例][ruby]{
p Dir.getwd......#=> "/home/matz/work/bar"
p ENV["HOME"] #=> "/home/matz"
p File.absolute_path("..") #=> "/home/matz/work"
p File.absolute_path("..", "/tmp") #=> "/"
p File.absolute_path("~") #=> "/home/matz/work/bar/~"
p File.absolute_path("~foo") #=> "/home/matz/work/bar/~......foo"
//}
@see File.expand_path... -
Psych
. dump _ stream(*objects) -> String (12414.0) -
オブジェクト列を YAML ドキュメント列に変換します。
...オブジェクト列を YAML ドキュメント列に変換します。
@param objects 変換対象のオブジェクト列
//emlist[例][ruby]{
Psych.dump_stream("foo\n ", {}) # => "--- ! \"foo\\n \"\n--- {}\n"
//}... -
Test
:: Unit . setup _ argv(original _ argv = ARGV) { |files| . . . } -> [String] (12338.0) -
original_argvで指定されたオプションを解析して、テスト対象になるファイル をrequireします。
...を解析して、テスト対象になるファイル
をrequireします。
@param original_argv オプションを指定します。省略された場合は、
Object::ARGVが使用されます。
@raise ArgumentError 指定されたファイルが存在しない場合に......quireの対象
にします。
ブロックパラメータには上記のoriginal_argvから-xで指定されたもの以外のオ
プションが配列で渡されます。ファイル名の代わりにディレクトリを指定する
と、ディレクトリの中にあるtest_*.rbを全てrequi......のメソッド自体は、オプションを解析してrequireを行う以外の処理は行いま
せんが、test/unit.rbをrequireして呼び出すメソッドのため、結果的にユニッ
トテストが実行されます。testrbコマンドのように、ユニットテストを実行... -
GC
:: Profiler . result -> String (12326.0) -
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 Object GC Time(ms)
1 0.012......e Time
Ruby が起動してから GC が起動するまでに経過した時間
: Use Size
ヒープ内での使用サイズ
: Total Size
ヒープ全体のサイズ
: Total Object
ヒープ内に存在するオブジェクトの個数
: GC Time
GC の処理時間
@see GC::Profiler.report... -
RubyVM
:: InstructionSequence . disasm(body) -> String (12203.0) -
引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。
...
RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字
列に変換して返します。
@param body Proc、Method オブジェクトを指定します。
例1:Proc オブジェクトを指定した場合
# /tmp/proc.rb
p = proc { num = 1 + 2 }
puts RubyVM::Inst......ructionSequence.disasm(p)
出力:
== disasm: <RubyVM::InstructionSequence:block in <main>@/tmp/proc.rb>===
== catch table
| catch type: redo st: 0000 ed: 0012 sp: 0000 cont: 0000
| catch type: next st: 0000 ed: 0012 sp: 0000 cont: 0012
|-----------------------------------------------......---
local table (size: 2, argc: 0 [opts: 0, rest: -1, post: 0, block: -1] s1)
[ 2] num
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 dup
0009 setlocal num, 0
001...