15231件ヒット
[1-100件を表示]
(0.141秒)
別のキーワード
ライブラリ
- ビルトイン (10354)
- abbrev (12)
- bigdecimal (312)
-
bigdecimal
/ util (43) - csv (555)
- digest (84)
- drb (12)
- erb (96)
- fiber (16)
- fiddle (12)
-
fiddle
/ import (12) -
io
/ wait (24) -
irb
/ cmd / help (12) -
irb
/ cmd / load (36) -
irb
/ context (48) -
irb
/ xmp (12) - json (144)
-
json
/ add / bigdecimal (12) -
json
/ add / exception (12) - kconv (12)
- logger (96)
- matrix (74)
- mkmf (72)
- monitor (4)
-
net
/ http (228) - open-uri (12)
- openssl (296)
- optparse (420)
- ostruct (19)
- pathname (217)
- pp (48)
- prime (36)
- psych (84)
- rake (192)
-
rake
/ loaders / makefile (12) -
rake
/ packagetask (60) -
rake
/ testtask (36) -
rdoc
/ parser / ruby (12) - resolv (12)
-
rexml
/ document (552) - ripper (12)
-
ripper
/ filter (12) -
ripper
/ lexer (24) - rubygems (12)
-
rubygems
/ commands / update _ command (12) -
rubygems
/ custom _ require (12) -
rubygems
/ gem _ path _ searcher (12) -
rubygems
/ requirement (84) -
rubygems
/ specification (84) -
rubygems
/ version (36) - set (113)
- socket (48)
- stringio (122)
- strscan (180)
- thread (18)
- timeout (16)
- un (12)
-
webrick
/ httprequest (12) - win32ole (84)
- zlib (24)
クラス
-
ARGF
. class (84) - Addrinfo (12)
- Array (1117)
- BasicObject (168)
- BasicSocket (36)
- BigDecimal (324)
- Binding (77)
- CSV (108)
-
CSV
:: Row (111) -
CSV
:: Table (336) - Class (52)
- Complex (57)
-
DRb
:: DRbUnknown (12) - Data (15)
-
Digest
:: Base (84) - Dir (36)
- ERB (96)
- Encoding (24)
-
Encoding
:: Converter (120) -
Encoding
:: InvalidByteSequenceError (24) - Enumerator (132)
-
Enumerator
:: Lazy (178) -
Enumerator
:: Yielder (24) - Exception (68)
- FalseClass (24)
- Fiber (54)
-
Fiddle
:: Pointer (12) -
File
:: Stat (276) - Float (176)
- FrozenError (6)
-
Gem
:: Commands :: UpdateCommand (12) -
Gem
:: GemPathSearcher (12) -
Gem
:: Requirement (84) -
Gem
:: Specification (84) -
Gem
:: Version (36) - Hash (837)
- IO (158)
-
IRB
:: Context (48) -
IRB
:: ExtendCommand :: Help (12) -
IRB
:: ExtendCommand :: Load (12) -
IRB
:: ExtendCommand :: Require (12) -
IRB
:: ExtendCommand :: Source (12) - Integer (297)
-
JSON
:: Parser (12) -
JSON
:: State (72) - Logger (96)
- MatchData (90)
- Matrix (62)
-
Matrix
:: LUPDecomposition (12) - Method (200)
- Module (688)
- Monitor (4)
- Mutex (8)
-
Net
:: HTTP (36) -
Net
:: HTTPGenericRequest (72) -
Net
:: HTTPResponse (48) - NilClass (43)
- Numeric (187)
- Object (801)
-
ObjectSpace
:: WeakMap (12) -
OpenSSL
:: ASN1 :: ASN1Data (12) -
OpenSSL
:: BN (272) - OpenStruct (19)
- OptionParser (336)
- PP (24)
- Pathname (217)
- Prime (24)
- Proc (80)
-
Psych
:: Nodes :: Node (24) -
Psych
:: ScalarScanner (12) -
Psych
:: Visitors :: YAMLTree (24) -
RDoc
:: Parser :: Ruby (12) -
REXML
:: Attribute (36) -
REXML
:: Attributes (156) -
REXML
:: Child (24) -
REXML
:: DocType (36) -
REXML
:: Element (204) -
REXML
:: Elements (96) -
Rake
:: FileList (108) -
Rake
:: FileTask (12) -
Rake
:: InvocationChain (24) -
Rake
:: MakefileLoader (12) -
Rake
:: PackageTask (60) -
Rake
:: TaskArguments (12) -
Rake
:: TestTask (36) - Random (24)
- Range (307)
- Rational (60)
- Regexp (93)
-
Resolv
:: DNS :: Name (12) - Ripper (12)
-
Ripper
:: Filter (12) -
Ripper
:: Lexer (24) -
RubyVM
:: AbstractSyntaxTree :: Node (49) -
RubyVM
:: InstructionSequence (130) - Set (128)
- String (1015)
- StringIO (122)
- StringScanner (180)
- Struct (169)
- Symbol (71)
- Thread (206)
-
Thread
:: Backtrace :: Location (84) -
Thread
:: ConditionVariable (24) -
Thread
:: Mutex (40) -
Thread
:: Queue (58) -
Thread
:: SizedQueue (36) - Time (168)
- TracePoint (134)
- TrueClass (36)
- UnboundMethod (156)
- UncaughtThrowError (22)
-
WEBrick
:: HTTPRequest (12) - WIN32OLE (36)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ TYPE (12) -
WIN32OLE
_ TYPELIB (12) -
WIN32OLE
_ VARIANT (12) -
Zlib
:: GzipWriter (24)
モジュール
- Comparable (87)
- Enumerable (1442)
-
Fiddle
:: Importer (12) - FileUtils (12)
- GC (12)
-
JSON
:: Generator :: GeneratorMethods :: Object (12) - Kernel (196)
-
Net
:: HTTPHeader (72) -
OpenURI
:: Meta (12) -
OptionParser
:: Arguable (84) -
Rake
:: Cloneable (24)
キーワード
- ! (12)
- != (12)
- !~ (12)
- % (24)
- & (12)
- ** (11)
- + (24)
- < (58)
- << (98)
- <= (58)
- <=> (36)
- == (315)
- === (136)
- =~ (21)
- > (58)
- >= (58)
- >> (38)
- JSON (12)
- [] (264)
- []= (108)
- ^ (36)
-
_ _ id _ _ (12) -
_ _ send _ _ (24) -
_ dump (24) - abbrev (12)
-
abort
_ on _ exception (12) -
abort
_ on _ exception= (12) - abs (69)
- abs2 (24)
- absolute? (12)
-
absolute
_ path (24) - add (12)
-
add
_ attribute (24) -
add
_ attributes (12) -
add
_ field (12) -
add
_ trace _ func (12) -
alias
_ method (4) - alive? (12)
- all? (53)
- allbits? (8)
- allocate (12)
-
allow
_ nan? (12) - antisymmetric? (7)
- any? (62)
- anybits? (8)
- append (20)
-
arg
_ config (12) - arity (24)
-
ascii
_ compatible? (12) - assoc (12)
- at (12)
- attr (12)
-
attr
_ accessor (4) -
attr
_ reader (4) -
attr
_ writer (4) - attribute (12)
-
attribute
_ of (12) -
attributes
_ of (12) - autoclose? (12)
- backtrace (24)
-
backtrace
_ locations (36) -
base
_ label (24) -
base
_ uri (12) - basename (12)
-
basic
_ auth (12) - begin (24)
-
beginning
_ of _ line? (12) - between? (12)
- bind (24)
-
bind
_ call (12) - binding (24)
- binmode (24)
- binread (12)
- birthtime (12)
-
bit
_ length (12) -
bit
_ set? (12) - blksize (12)
- blockdev? (12)
- blocks (12)
- body (24)
- body= (12)
-
body
_ stream (12) -
body
_ stream= (12) - bol? (12)
- broadcast (12)
- bsearch (48)
-
bsearch
_ index (20) - bump (12)
-
by
_ col (12) -
by
_ col! (12) -
by
_ col _ or _ row (12) -
by
_ col _ or _ row! (12) -
by
_ row (12) -
by
_ row! (12) - byteindex (3)
- byteoffset (6)
- byterindex (3)
- bytes (50)
- bytesize (12)
- byteslice (36)
- call (24)
-
callee
_ id (12) - casecmp (12)
- casecmp? (18)
- casefold? (12)
- ceil (24)
- chain (7)
- chardev? (12)
- chars (12)
-
check
_ circular? (12) - children (7)
- chunk (12)
-
chunk
_ while (12) - chunked? (12)
- clamp (15)
- class (12)
-
class
_ eval (24) -
class
_ exec (12) -
class
_ variable _ defined? (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) -
class
_ variables (12) -
clear
_ bit! (12) - clone (36)
- close (12)
- closed? (46)
- cmp (12)
- codepoints (12)
- coerce (24)
-
cofactor
_ expansion (12) - collect (36)
-
collect
_ concat (36) - combination (24)
-
comma
_ breakable (12) - compact (13)
- compact! (9)
-
compare
_ by _ identity (12) -
compare
_ by _ identity? (12) - concat (18)
-
connect
_ from (12) -
const
_ defined? (12) -
const
_ get (12) -
const
_ set (12) -
const
_ source _ location (12) - constants (12)
- convert (12)
- count (48)
- cover? (19)
- curry (46)
- cycle (48)
- debug (24)
- debug? (12)
- deconstruct (12)
-
def
_ class (12) -
def
_ method (12) -
def
_ module (12) - default (24)
-
default
_ event _ sources (12) -
define
_ method (24) -
define
_ singleton _ method (24) - delete (96)
-
delete
_ all (12) -
delete
_ at (12) -
delete
_ attribute (12) -
delete
_ element (12) -
delete
_ if (24) - deq (24)
- detect (24)
- dig (30)
- digest (12)
- digest! (12)
- digits (12)
- directory? (12)
- disable (24)
- disasm (12)
- disassemble (12)
- disjoint? (12)
- display (12)
- divmod (12)
-
do
_ not _ reverse _ lookup (12) -
do
_ rubygems _ update (12) - drop (12)
-
drop
_ while (24) - dst? (12)
- dummy? (12)
- dump (12)
- dup (24)
- each (144)
-
each
_ attribute (12) -
each
_ byte (72) -
each
_ char (12) -
each
_ codepoint (12) -
each
_ cons (24) -
each
_ element _ with _ attribute (12) -
each
_ element _ with _ text (12) -
each
_ entry (24) -
each
_ grapheme _ cluster (8) -
each
_ key (24) -
each
_ pair (36) -
each
_ slice (24) -
each
_ value (24) -
each
_ with _ index (24) -
each
_ with _ object (24) -
egrep
_ cpp (24) - empty? (93)
- enable (24)
- encode (36)
- end (12)
-
end
_ seen? (12) -
end
_ with? (18) - entity (12)
- entries (19)
-
enum
_ for (36) - eof (12)
- eof? (12)
- eos? (12)
- eql? (195)
- equal? (36)
- error? (12)
-
error
_ bytes (12) - eval (24)
- even? (12)
- event (12)
- exact? (12)
- except (4)
-
exclude
_ end? (12) -
excluded
_ from _ list? (12) - executable? (12)
-
executable
_ real? (12) - execute (48)
- extend (12)
-
extend
_ object (12) - extended (12)
- fatal? (12)
- feed (12)
- fetch (80)
-
fetch
_ values (20) - field (12)
- field? (12)
-
field
_ row? (12) -
field
_ size _ limit (12) - file? (12)
- filename (12)
- filename= (12)
- filter (49)
- filter! (28)
-
filter
_ map (12) - find (24)
-
find
_ all (24) -
find
_ index (36) - finish (24)
- finite? (30)
- first (60)
-
first
_ column (7) -
first
_ lineno (19) -
fixed
_ encoding? (12) -
flat
_ map (36) - floor (24)
- fnmatch (12)
- force (12)
-
force
_ quotes? (12) - formatter (12)
- freeze (12)
- friday? (12)
- frozen? (12)
-
garbage
_ collect (12) - gem (12)
- get (12)
-
get
_ attribute (12) -
get
_ attribute _ ns (12) -
get
_ byte (12) -
get
_ text (12) - getbyte (48)
- getc (12)
- getch (12)
- getopts (36)
- glob (16)
- gmt? (12)
-
grapheme
_ clusters (8) - grep (24)
-
grep
_ v (24) -
group
_ by (24) - grpowned? (12)
- gsub (48)
- gsub! (60)
- handler= (12)
-
has
_ elements? (12) -
has
_ key? (12) -
has
_ value? (12) - hash (48)
-
have
_ framework (24) - header? (12)
-
header
_ row? (24) - headers (12)
- hexdigest (12)
- hexdigest! (12)
-
ignore
_ deadlock= (4) - include? (96)
-
incomplete
_ input? (12) - index (7)
- info? (12)
- inherited (12)
- initialize (12)
-
initialize
_ copy (12) - inject (36)
- insert (12)
-
insert
_ output (12) - inspect (121)
-
install
_ rb (12) -
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ method (12) -
instance
_ methods (12) -
instance
_ of? (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variable _ set (12) -
instance
_ variables (12) -
instruction
_ sequence (7) - integer? (12)
- intern (12)
- intersect? (4)
- intersection (6)
- invert (12)
-
is
_ a? (24) - isatty (12)
- isdst (12)
- iseuc (12)
- itself (12)
- j (12)
- jj (12)
-
json
_ creatable? (12) -
keep
_ if (48) - key (12)
- key? (36)
- keys (12)
-
kind
_ of? (24) - label (24)
- lambda? (12)
-
laplace
_ expansion (12) - last (36)
-
last
_ column (7) -
last
_ lineno (7) - lazy (12)
- length (24)
- lex (12)
-
lib
_ dirs _ for (12) - lineno (12)
- load (24)
-
local
_ address (12) -
local
_ variable _ defined? (12) -
local
_ variable _ get (12) -
local
_ variable _ set (12) -
local
_ variables (11) - locked? (12)
- lshift! (12)
- magnitude (57)
- map (36)
-
marshal
_ dump (12) -
marshal
_ load (12) -
mask
_ bits! (12) - match (36)
- match? (39)
- matched? (12)
-
matched
_ size (12) - max (130)
-
max
_ by (48) - member? (60)
- members (15)
- merge (24)
- merge! (24)
- method (12)
-
method
_ defined? (12) -
method
_ id (12) -
method
_ missing (12) - methods (12)
- min (130)
-
min
_ by (48) - minmax (48)
-
minmax
_ by (24) -
mod
_ add (12) -
mod
_ exp (12) -
mod
_ inverse (12) -
mod
_ mul (12) -
mod
_ sub (12) - mode (12)
-
module
_ eval (24) -
module
_ exec (12) -
module
_ function (12) - modulo (12)
- monday? (12)
- mountpoint? (12)
- name (41)
-
named
_ captures (12) - namespace (24)
- namespaces (24)
- nan? (12)
-
need
_ tar (12) -
need
_ tar _ bz2 (12) -
need
_ tar _ bz2= (12) -
need
_ tar _ gz (12) -
need
_ zip (12) - needed? (12)
- negative? (37)
- new (12)
- next (24)
- next! (12)
-
next
_ element (12) -
next
_ sibling= (12) - nil? (12)
- nobits? (8)
- none? (65)
- nonzero? (24)
-
num
_ bits (12) -
num
_ bytes (12) -
object
_ id (12) -
object
_ nl (12) -
object
_ nl= (12) - oct (12)
- odd? (12)
-
ole
_ query _ interface (12) - on (144)
-
on
_ head (12) -
on
_ tail (12) - one? (53)
- order (48)
- order! (48)
-
original
_ name (24) - overlap? (2)
- owned? (24)
- owner (12)
- pack (21)
- parameters (31)
- parse (36)
- parse! (12)
- partition (24)
- path (36)
- peek (24)
- peep (12)
- permutation (12)
- permute (24)
- permute! (24)
- pipe? (12)
- pop (36)
- pos= (12)
- positive? (29)
- post (12)
- pow (22)
- pread (8)
- prefix (12)
- prefixes (24)
- prepend (20)
-
prepend
_ features (12) - prerelease? (24)
-
pretty
_ print (24) -
pretty
_ print _ cycle (12) -
previous
_ sibling= (12) - prime? (12)
-
prime
_ fasttest? (12) -
primitive
_ convert (48) - print (12)
- printf (12)
- priority (12)
- priority= (12)
- private (48)
-
private
_ instance _ methods (12) -
private
_ method _ defined? (12) -
prompt
_ mode (12) -
prompt
_ mode= (12) -
proper
_ subset? (12) -
proper
_ superset? (12) -
protected
_ method _ defined? (12) -
proxy
_ basic _ auth (12) -
psych
_ y (12) - public (60)
-
public
_ class _ method (24) -
public
_ constant (12) -
public
_ instance _ method (12) -
public
_ method (12) -
public
_ method _ defined? (12) -
public
_ send (24) - push (36)
- putback (24)
- putc (12)
- puts (12)
- query (12)
- raise (18)
- rassoc (12)
- read (12)
-
read
_ body (24) - readable? (12)
-
readable
_ real? (12) - readbyte (36)
- readlines (12)
- real? (24)
- realdirpath (12)
- realpath (12)
- receiver (29)
- reduce (36)
- regexp (12)
- regular? (12)
- rehash (12)
- reject (36)
- relative? (12)
-
relative
_ path _ from (12) - reload (12)
- remainder (12)
-
remote
_ address (12) -
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ instance _ variable (12) -
repeated
_ combination (24) - replace (12)
- replacement= (12)
-
report
_ on _ exception (9) -
report
_ on _ exception= (9) -
request
_ body _ permitted? (12) - require (12)
-
required
_ ruby _ version (12) -
required
_ ruby _ version= (12) -
required
_ rubygems _ version (12) -
required
_ rubygems _ version= (12) -
respond
_ to? (12) -
respond
_ to _ missing? (12) -
response
_ body _ permitted? (12) - rest? (12)
- result (12)
- resume (12)
-
return
_ headers? (12) -
return
_ value (12) -
reverse
_ each (48) - rewind (12)
- root? (12)
- rotate (12)
- rotate! (12)
- round (36)
- rshift! (12)
- ruby (12)
-
ruby2
_ keywords (18) -
ruby
_ opts (12) -
ruby
_ opts= (12) -
rubygems
_ version (12) -
rubygems
_ version= (12) - run (12)
- sample (24)
-
satisfied
_ by? (12) - saturday? (12)
- scan (36)
-
scan
_ full (12) - scrub (36)
- scrub! (36)
-
search
_ full (12) - seek (12)
- select (84)
- select! (48)
- self (12)
- send (24)
- seplist (12)
-
set
_ backtrace (12) -
set
_ bit! (12) -
set
_ debug _ output (12) -
set
_ encoding _ by _ bom (6) -
set
_ trace _ func (12) - setbyte (12)
- setgid? (12)
- setproperty (24)
- setuid? (12)
- shift (48)
- sign (12)
- signal (12)
-
singleton
_ class (12) -
singleton
_ class? (12) -
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) - size (36)
-
skew
_ symmetric? (7) -
skip
_ blanks? (12) - slice (92)
- slice! (48)
-
slice
_ after (35) -
slice
_ before (60) -
slice
_ when (23) - socket? (12)
- solve (12)
- sort (48)
- sort! (24)
-
sort
_ by (24) -
sort
_ by! (24) -
source
_ location (19) -
space
_ before (12) -
space
_ before= (12) - specific? (12)
- split (31)
- src (12)
-
start
_ with? (18) - step (62)
- sticky? (12)
- stop? (12)
- store (12)
- strftime (12)
- sub (60)
- sub! (48)
-
sub
_ ext (12) -
sub
_ type (12) - subclasses (4)
-
subdomain
_ of? (12) - subsec (12)
- subset? (12)
- subtract (12)
- succ (12)
- succ! (12)
- sum (54)
- sunday? (12)
- superset? (12)
- sync (12)
- synchronize (12)
- tag (11)
- taint (9)
- tainted? (9)
- take (12)
-
take
_ while (48) - tally (10)
- tap (12)
- text (12)
- text= (12)
- then (14)
-
thread
_ variable _ set (12) - thursday? (12)
- timeout (16)
-
to
_ a (103) -
to
_ ary (24) -
to
_ binary (10) -
to
_ bn (12) -
to
_ csv (12) -
to
_ d (43) -
to
_ enum (36) -
to
_ h (69) -
to
_ hash (12) -
to
_ i (12) -
to
_ int (12) -
to
_ json (36) -
to
_ proc (24) -
to
_ regexp (12) -
to
_ ruby (24) -
to
_ s (158) -
to
_ set (24) -
to
_ str (12) -
to
_ string (12) -
to
_ sym (12) -
to
_ value (12) - tokenize (12)
- transfer (12)
- transform (12)
-
transform
_ keys (20) -
transform
_ keys! (20) -
transform
_ values (18) -
transform
_ values! (18) - truncate (24)
- trust (9)
-
try
_ lock (12) - tty? (12)
- tuesday? (12)
- type (7)
- ucmp (12)
- unbind (12)
-
unconverted
_ fields? (12) -
undef
_ method (12) -
unicode
_ normalized? (11) - union (7)
- uniq (24)
- unpack (12)
- unpack1 (9)
- unshift (12)
- untaint (9)
- untrust (9)
- untrusted? (9)
- update (24)
- upto (12)
-
use
_ readline (12) -
use
_ readline? (12) - utc? (12)
-
valid
_ encoding? (12) - value (35)
- value? (12)
- values (24)
-
values
_ at (60) - wait (12)
-
wait
_ for _ cond (4) -
wait
_ readable (12) -
wait
_ writable (12) - warn? (12)
- warning (12)
- wednesday? (12)
-
with
_ index (36) -
with
_ object (24) -
world
_ readable? (12) -
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) - write (12)
-
write
_ headers? (12) - xmp (12)
- xpath (12)
- y (12)
- yield (12)
-
yield
_ self (16) - zero? (48)
- zip (72)
- | (36)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (29119.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
...して返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data メソ......to_binary で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキテクチャのRubyで作られたバイナリデータは使用できません。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.to_bina......ry("extra_data")
# ※表示の都合上改行しているが実際は改行はない
# => "YARB\x02\x00\x00\x00\x03\x00\x00\x00\x16\x02\x00\x00\n\x00\x00\x00\x01
# \x00\x00\x00\x03\x00\x00\x00\x05\x00\x00\x00\x84\x01\x00\x00\x88\x01\x00
# \x00\x02\x02\x00\x00x86_64-darwin15\x00*\x00\x00\x00\x00\x0... -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (29101.0) -
self が表す命令シーケンスの絶対パスを返します。
...ます。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello......puts "hello, world"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"
@see RubyVM::InstructionSequence#path... -
RubyVM
:: InstructionSequence # base _ label -> String (29101.0) -
self が表す命令シーケンスの基本ラベルを返します。
...す。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.base_label
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello......# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.base_label # => "<main>"
例3:
# /tmp/method2.rb
def hello
puts "hello, world"
end
RubyVM::InstructionSequence.of(method(:hello)).base_label
# => "hello"
@see RubyVM::InstructionSequence#label... -
RubyVM
:: InstructionSequence # disassemble -> String (29101.0) -
self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
...返します。
puts RubyVM::InstructionSequence.compile('1 + 2').disasm
出力:
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 o......pt_plus <ic:1>
0008 leave
@see RubyVM::InstructionSequence.disasm... -
RubyVM
:: InstructionSequence # label -> String (29101.0) -
self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。
...す。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.label
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
pu......end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.label # => "<main>"
例3:
# /tmp/method2.rb
def hello
puts "hello, world"
end
RubyVM::InstructionSequence.of(method(:hello)).label
# => "hello"
@see RubyVM::InstructionSequence#base_label... -
RubyVM
:: AbstractSyntaxTree :: Node # type -> Symbol (26107.0) -
self の種類を Symbol で返します。
...self の種類を Symbol で返します。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
p node.type # => :SCOPE
//}... -
RubyVM
:: InstructionSequence # eval -> object (26101.0) -
self の命令シーケンスを評価してその結果を返します。
...self の命令シーケンスを評価してその結果を返します。
RubyVM::InstructionSequence.compile("1 + 2").eval # => 3... -
RubyVM
:: InstructionSequence # to _ a -> Array (26013.0) -
self の情報を 14 要素の配列にして返します。
...:local_size: ローカル変数の総数 + 1。
:stack_max: スタックの深さ。(SystemStackError を検出するために使用)
: #label
メソッド名、クラス名、モジュール名などで構成される命令シーケンスのラ
ベル。トップレベルでは "<ma......合は "<compiled>"。
: #absolute_path
命令シーケンスの絶対パス。文字列から作成していた場合は nil。
: #first_lineno
命令シーケンスの 1 行目の行番号。
: type
命令シーケンスの種別。
:top、:method、:block、:class、:rescue、:ensur......数名からなる Symbol の配列。
: args
引数の指定が必須のメソッド、ブロックの引数の個数。あるいは以下のよう
な配列。
[required_argc, [optional_arg_labels, ...],
splat_index, post_splat_argc, post_splat_index,
block_index, simple]... -
RubyVM
:: AbstractSyntaxTree :: Node # children -> Array (26007.0) -
self の子ノードを配列で返します。
...type によって異なります。
戻り値は、ほかの RubyVM::AbstractSyntaxTree::Node のインスタンスや nil を含みます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.children
# => [[], nil, #<RubyVM::AbstractSyntaxTree::Node:OPCALL@1:0-1:5>]
//}... -
RubyVM
:: AbstractSyntaxTree :: Node # first _ column -> Integer (26007.0) -
ソースコード中で、self を表すテキストが最初に現れる列番号を返します。
...ソースコード中で、self を表すテキストが最初に現れる列番号を返します。
列番号は0-originで、バイト単位で表されます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.first_column # => 0
//}...