別のキーワード
ライブラリ
- ビルトイン (1030)
- bigdecimal (65)
- coverage (15)
- csv (84)
- erb (12)
- fiber (8)
- fiddle (12)
- json (24)
- logger (9)
- matrix (52)
-
net
/ http (24) - openssl (156)
- optparse (24)
- pathname (24)
- pp (36)
- prettyprint (12)
- psych (174)
- rake (84)
- rbconfig (24)
-
rdoc
/ parser / ruby (12) -
rexml
/ document (48) -
ripper
/ lexer (12) -
ripper
/ sexp (24) - rubygems (12)
-
rubygems
/ defaults (12) -
rubygems
/ requirement (12) -
rubygems
/ version (8) - socket (36)
- stringio (12)
-
syslog
/ logger (12) - tsort (93)
- uri (62)
-
webrick
/ ssl (12) - win32ole (36)
クラス
- Array (48)
- BigDecimal (65)
- CSV (72)
-
CSV
:: Table (12) - Class (24)
- Coverage (15)
- Data (6)
- Dir (114)
- ERB (12)
- Encoding (12)
- Enumerator (19)
-
Enumerator
:: Lazy (12) - Fiber (36)
-
Fiddle
:: Closure :: BlockCaller (12) - File (134)
-
Gem
:: Requirement (12) -
Gem
:: Version (8) - Hash (42)
- IO (72)
- Integer (4)
- Logger (9)
- Matrix (40)
- Module (24)
-
Net
:: HTTP (12) -
Net
:: HTTPResponse (12) - Object (24)
-
OpenSSL
:: ASN1 :: BMPString (24) -
OpenSSL
:: ASN1 :: BitString (24) -
OpenSSL
:: ASN1 :: Boolean (24) -
OpenSSL
:: ASN1 :: Enumerated (24) -
OpenSSL
:: ASN1 :: PrintableString (24) -
OpenSSL
:: BN (36) - OptionParser (24)
- PP (36)
- Pathname (24)
- PrettyPrint (12)
-
Psych
:: Visitors :: YAMLTree (12) -
RDoc
:: Parser :: Ruby (12) -
REXML
:: Entity (12) -
REXML
:: XPath (36) -
Rake
:: InvocationChain (24) - Random (7)
- Regexp (48)
- Ripper (36)
- RubyVM (1)
-
RubyVM
:: InstructionSequence (116) - SignalException (24)
- Socket (24)
- String (21)
- StringIO (12)
- Struct (28)
- Symbol (12)
-
Syslog
:: Logger (12) - SystemCallError (12)
- TCPSocket (12)
- Thread (60)
-
Thread
:: Queue (8) - TracePoint (24)
- Vector (12)
-
WEBrick
:: GenericServer (12) -
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ TYPE (24)
モジュール
- GC (48)
- Gem (12)
-
Gem
:: QuickLoader (12) - JSON (24)
- Psych (150)
- Rake (24)
- RakeFileUtils (36)
- RbConfig (24)
-
RubyVM
:: AbstractSyntaxTree (30) -
RubyVM
:: MJIT (21) - TSort (93)
- URI (62)
オブジェクト
- ENV (19)
キーワード
- === (12)
- DEBUG (12)
- DEBUG= (12)
- [] (48)
-
abort
_ on _ exception (12) -
abort
_ on _ exception= (12) -
absolute
_ path (12) -
absolute
_ path? (6) -
all
_ symbols (12) - append (12)
- application (12)
- application= (12)
- basename (12)
- basis (12)
- binread (12)
- binwrite (12)
- birthtime (11)
-
body
_ permitted? (12) - build (24)
- bytes (7)
- chdir (24)
- clone (12)
- combine (16)
- compatible? (12)
- compile (12)
-
compile
_ file (12) -
compile
_ option (12) -
compile
_ option= (12) - constants (12)
- correct? (8)
-
create
_ id (12) - current (12)
-
decode
_ www _ form _ component (12) - define (3)
- disable (12)
- disasm (12)
- disassemble (12)
-
double
_ fig (12) - dump (24)
-
dump
_ stream (12) - each (12)
-
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) - empty? (9)
- enable (12)
- enabled? (7)
- encode (7)
-
encode
_ www _ form _ component (12) - escape (7)
- exist? (12)
- exists? (18)
- first (12)
- fnmatch (12)
- fnmatch? (12)
-
for
_ fd (12) - format (12)
- gethostbyname (24)
- glob (48)
- instance (12)
- join (24)
-
keyword
_ init? (4) -
last
_ match (24) -
latest
_ gc _ info (12) - lex (12)
- limit (12)
-
line
_ stub (7) - load (15)
-
load
_ documents (8) -
load
_ file (12) -
load
_ from _ binary (10) -
load
_ from _ binary _ extra _ data (10) -
load
_ full _ rubygems _ library (12) -
load
_ stream (24) - match (12)
- matches? (12)
- members (15)
- mode (24)
- new (501)
-
nowrite
_ flag (12) - of (22)
-
ole
_ classes (12) - open (96)
- parse (46)
-
parse
_ file (10) -
parse
_ stream (24) - pause (7)
- pp (12)
- read (12)
- readlines (12)
- realpath (12)
-
resolve
_ feature _ path (1) - resume (7)
-
ruby2
_ keywords _ hash? (6) -
ruby
_ engine (12) - running? (8)
-
safe
_ load (19) - sexp (12)
-
sexp
_ raw (12) -
sharing
_ detection (12) -
sharing
_ detection= (12) - start (12)
- stat (12)
- stop (12)
-
strongly
_ connected _ components (12) - table (12)
- tcp (12)
-
to
_ h (7) - trace (12)
-
try
_ convert (52) - tsort (12)
-
tsort
_ each (23) - typelibs (12)
- union (12)
-
used
_ modules (12) - ver (5)
-
verbose
_ flag (12) -
verbose
_ flag= (12) -
world
_ readable? (12) -
world
_ writable? (12) -
yaml
_ tag (12) - yield (12)
検索結果
先頭5件
- RubyVM
:: InstructionSequence . compile(source , file = nil , path = nil , line = 1 , options = nil) -> RubyVM :: InstructionSequence - RubyVM
:: InstructionSequence . new(source , file = nil , path = nil , line = 1 , options = nil) -> RubyVM :: InstructionSequence - RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: AbstractSyntaxTree . parse(string , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: InstructionSequence . compile _ file(file , options = nil) -> RubyVM :: InstructionSequence
-
RubyVM
:: InstructionSequence . compile(source , file = nil , path = nil , line = 1 , options = nil) -> RubyVM :: InstructionSequence (6223.0) -
引数 source で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
...引数 source で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param source Ruby のソースコードを文字列で指定します。
@param file ファイル名を文字列で指定しま......れかで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。
RubyVM::InstructionSequence.compile("a = 1 + 2")
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
@see RubyVM::InstructionSequence.compile_file... -
RubyVM
:: InstructionSequence . new(source , file = nil , path = nil , line = 1 , options = nil) -> RubyVM :: InstructionSequence (6223.0) -
引数 source で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
...引数 source で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param source Ruby のソースコードを文字列で指定します。
@param file ファイル名を文字列で指定しま......れかで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。
RubyVM::InstructionSequence.compile("a = 1 + 2")
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
@see RubyVM::InstructionSequence.compile_file... -
RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node (6219.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
...対象の Ruby のコードを文字列で指定します。
@raise SyntaxError string が Ruby のコードとして正しくない場合に発生します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# => (SCOPE@1:0-1:9
# tbl: [:x]
# args: nil
# body:
#......文字列を抽象構文木にパースし、その木の根ノードを返します。
@param string パースする対象の Ruby のコードを文字列で指定します。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコ......を生成します。
@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)
# => (SCOPE@1:0-1:15
# tbl: [:x, :y]
# args: nil
# body: (BLOCK@1:0-1:15 (LASGN@1:0-1:5 :x (LIT@1:4-1:5 1)) (ERROR@1:7-1:11) (LASGN@1:12-1:15 :y... -
RubyVM
:: AbstractSyntaxTree . parse(string , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (6219.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
...文字列を抽象構文木にパースし、その木の根ノードを返します。
@param string パースする対象の Ruby のコードを文字列で指定します。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコ......を生成します。
@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)
# => (SCOPE@1:0-1:15
# tbl: [:x, :y]
# args: nil
# body: (BLOCK@1:0-1:15 (LASGN@1:0-1:5 :x (LIT@1:4-1:5 1)) (ERROR@1:7-1:11) (LASGN@1:12-1:15 :y... -
RubyVM
:: InstructionSequence . compile _ file(file , options = nil) -> RubyVM :: InstructionSequence (6217.0) -
引数 file で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
...引数 file で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
RubyVM::InstructionSequence.compile とは異なり、file、path などの
メタデータは自動的に取得します。
@param......細は
RubyVM::InstructionSequence.compile_option= を参照
してください。
# /tmp/hello.rb
puts "Hello, world!"
# irb
RubyVM::InstructionSequence.compile_file("/tmp/hello.rb")
# => <RubyVM::InstructionSequence:<main>@/tmp/hello.rb>
@see RubyVM::Inst... -
RubyVM
:: AbstractSyntaxTree . parse _ file(pathname) -> RubyVM :: AbstractSyntaxTree :: Node (6213.0) -
pathname のファイルを読み込み、その内容を抽象構文木にパースし、その木の根ノードを返します。
...taxError pathname から取得された文字列が Ruby のコードとして正しくない場合に発生します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse_file(__FILE__)
# => (SCOPE@1:0-1:50
# tbl: []
# args: nil
# body:
# (FCALL@1:0-1:50 :pp
# (LIST@1......:3-1:50
# (CALL@1:3-1:50
# (COLON2@1:3-1:29 (CONST@1:3-1:9 :RubyVM) :AbstractSyntaxTree)
# :parse_file (LIST@1:41-1:49 (STR@1:41-1:49 "") nil)) nil)))
//}... -
RubyVM
:: AbstractSyntaxTree . parse _ file(pathname , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (6213.0) -
pathname のファイルを読み込み、その内容を抽象構文木にパースし、その木の根ノードを返します。
...taxError pathname から取得された文字列が Ruby のコードとして正しくない場合に発生します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse_file(__FILE__)
# => (SCOPE@1:0-1:50
# tbl: []
# args: nil
# body:
# (FCALL@1:0-1:50 :pp
# (LIST@1......:3-1:50
# (CALL@1:3-1:50
# (COLON2@1:3-1:29 (CONST@1:3-1:9 :RubyVM) :AbstractSyntaxTree)
# :parse_file (LIST@1:41-1:49 (STR@1:41-1:49 "") nil)) nil)))
//}... -
CSV
. table(path , options = Hash . new) -> CSV :: Table | [Array] (6207.0) -
以下と同等のことを行うメソッドです。
...以下と同等のことを行うメソッドです。
//emlist[][ruby]{
CSV.read( path, { headers: true,
converters: :numeric,
header_converters: :symbol }.merge(options) )
//}
@param path ファイル名を指定します。
@param options C... -
Net
:: HTTPResponse . body _ permitted? -> bool (6207.0) -
エンティティボディを含むことが許されているレスポンスクラス ならば真を、そうでなければ偽を返します。
...エンティティボディを含むことが許されているレスポンスクラス
ならば真を、そうでなければ偽を返します。
//emlist[例][ruby]{
require 'net/http'
Net::HTTPSuccess.body_permitted? # => true
Net::HTTPNotModified.body_permitted? # => false
//}... -
RakeFileUtils
. verbose _ flag -> bool (6207.0) -
この値が真の場合、詳細を表示します。
...この値が真の場合、詳細を表示します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :sample_file_task
file :sample_file_task do |t|
# --verbose で rake を実行する
RakeFileUtils.verbose_flag # => true
end
//}... -
RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node (6207.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...、
irbのようなファイルを介さない対話的環境では動作しません。
@param proc Procもしくはメソッドオブジェクトを指定します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:......(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
# fi......rst_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)))
//}......の抽象構文木を返します。
このメソッドはProcやメソッドが定義されたファイルを読み込む必要があるため、
irbのようなファイルを介さない対話的環境では動作しません。
@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......(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... -
RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (6207.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...の抽象構文木を返します。
このメソッドはProcやメソッドが定義されたファイルを読み込む必要があるため、
irbのようなファイルを介さない対話的環境では動作しません。
@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......(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... -
RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence (6207.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......# => <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 を使用した場合
# /tmp/iseq_of.rb
def......obal_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)
> # => #<Ruby...