クラス
-
ARGF
. class (33) - Array (118)
- Data (2)
- Encoding (44)
-
Encoding
:: Converter (55) - Enumerator (22)
-
Enumerator
:: Lazy (10) - IO (124)
- Integer (44)
- MatchData (48)
- Method (11)
- Module (16)
- Numeric (11)
- Object (44)
- Proc (11)
-
RubyVM
:: InstructionSequence (44) - String (26)
- Struct (6)
- Symbol (10)
- Thread (22)
- Time (66)
モジュール
-
File
:: Constants (11) -
GC
:: Profiler (88) - Kernel (44)
- ObjectSpace (22)
- Process (22)
-
RubyVM
:: AbstractSyntaxTree (2)
キーワード
- === (11)
- Bignum (9)
-
CLOCK
_ PROF (11) - ConditionVariable (9)
- Fixnum (9)
- NOFOLLOW (11)
- Profiler (11)
-
RLIMIT
_ NOFILE (11) -
SJIS
_ SOFTBANK (11) -
SJIS
_ SoftBank (11) - SizedQueue (9)
-
UTF8
_ SOFTBANK (11) -
UTF8
_ SoftBank (11) - [] (11)
- advise (11)
- autoload (22)
- autoload? (11)
-
base
_ label (11) - begin (11)
- binread (11)
- binwrite (11)
- byteindex (2)
- byteoffset (4)
- byterindex (2)
- chr (22)
- clear (11)
- coerce (11)
- combination (22)
-
copy
_ stream (11) - curry (11)
-
deconstruct
_ keys (2) - digits (22)
- disable (11)
-
each
_ object (22) - enable (11)
- enabled? (11)
- end (11)
-
end
_ with? (5) - eof (11)
- eof? (11)
- fetch (11)
-
first
_ lineno (11) - getlocal (11)
- gets (11)
-
gmt
_ offset (11) - gmtoff (11)
-
handle
_ interrupt (11) -
instance
_ of? (11) -
is
_ a? (11) -
kind
_ of? (11) - label (11)
- localtime (11)
- new (6)
- offset (22)
- pack (19)
- permutation (22)
- pread (7)
-
primitive
_ convert (44) -
primitive
_ errinfo (11) - pwrite (7)
-
raw
_ data (11) - read (11)
- readbyte (11)
- readchar (11)
- readline (11)
-
repeated
_ combination (22) -
repeated
_ permutation (22) - report (11)
- result (11)
-
ruby2
_ keywords (5) - seek (22)
-
source
_ location (11) -
start
_ with? (5) - strftime (11)
- sysseek (11)
-
to
_ f (11) -
total
_ time (11) - unpack (11)
-
utc
_ offset (11) -
with
_ index (32) - write (11)
検索結果
先頭5件
- RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence - RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node - Object
# instance _ of?(klass) -> bool - Encoding
:: SJIS _ SOFTBANK -> Encoding - Encoding
:: SJIS _ SoftBank -> Encoding
-
RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence (29239.0) -
引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。
...:InstructionSequence オブジェクトを作成して返します。
@param body Proc、Method オブジェクトを指定します。
例1:irb で実行した場合
# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)
> # => <RubyVM::InstructionSequence:block in irb_bin......ding@(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, world"
end
$a_global_......' + '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:0x0... -
RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (26216.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...み込む必要があるため、
irbのようなファイルを介さない対話的環境では動作しません。
@param proc Procもしくはメソッドオブジェクトを指定します。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけら....../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.of(me......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:2-6:21 :puts (LIST@6:7-6:21 (STR@6:7-6:21 "hello, world") nil)))
//}... -
Object
# instance _ of?(klass) -> bool (20233.0) -
オブジェクトがクラス klass の直接のインスタンスである時真を返します。
...。
obj.instance_of?(c) が成立する時には、常に obj.kind_of?(c) も成立します。
@param klass Classかそのサブクラスのインスタンスです。
//emlist[][ruby]{
class C < Object
end
class S < C
end
obj = S.new
p obj.instance_of?(S) # true
p obj.instance_of?(C)......# false
//}
@see Object#kind_of?,Object#class... -
Encoding
:: SJIS _ SOFTBANK -> Encoding (20202.0) -
SJIS-SoftBank エンコーディングです。
...SJIS-SoftBank エンコーディングです。
Shift_JIS, CP932 の亜種です。
SoftBank の携帯電話で使われる絵文字が含まれています。
@see http://creation.mb.softbank.jp/mc/tech/tech_pic/pic_index.html... -
Encoding
:: SJIS _ SoftBank -> Encoding (20202.0) -
SJIS-SoftBank エンコーディングです。
...SJIS-SoftBank エンコーディングです。
Shift_JIS, CP932 の亜種です。
SoftBank の携帯電話で使われる絵文字が含まれています。
@see http://creation.mb.softbank.jp/mc/tech/tech_pic/pic_index.html... -
Process
:: RLIMIT _ NOFILE -> Integer (20202.0) -
リソースの種類がプロセスがオープンできるファイルの数であることを示す定数です。
...リソースの種類がプロセスがオープンできるファイルの数であることを示す定数です。
Process.#getrlimit、Process.#setrlimit で使われます。
システムによっては定義されていません。... -
GC
:: Profiler (20002.0) -
GC の起動回数や起動したタイミング、処理時間などの GC に関するプロファイル 情報や、ヒープ全体のサイズ、ヒープ内での使用サイズやヒープ内に存在する オブジェクトの個数といった情報を扱うモジュールです。
GC の起動回数や起動したタイミング、処理時間などの GC に関するプロファイル
情報や、ヒープ全体のサイズ、ヒープ内での使用サイズやヒープ内に存在する
オブジェクトの個数といった情報を扱うモジュールです。
@see GC -
String
# byteindex(pattern , offset = 0) -> Integer | nil (17302.0) -
文字列の offset から右に向かって pattern を検索し、 最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。 見つからなければ nil を返します。
...文字列の offset から右に向かって pattern を検索し、
最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。
見つからなければ nil を返します。
引数 pattern は探索する部分文字列または正規表現で指定......aram offset 探索を開始するバイト単位のオフセット
@raise IndexError オフセットが文字列の境界以外をさしているときに発生します。
//emlist[例][ruby]{
'foo'.byteindex('f') # => 0
'foo'.byteindex('o') # => 1
'foo'.byteindex('oo') # => 1
'foo'.byteindex......=> nil
'foo'.byteindex(/f/) # => 0
'foo'.byteindex(/o/) # => 1
'foo'.byteindex(/oo/) # => 1
'foo'.byteindex(/ooo/) # => nil
'foo'.byteindex('o', 1) # => 1
'foo'.byteindex('o', 2) # => 2
'foo'.byteindex('o', 3) # => nil
'foo'.byteindex('o', -1) # => 2
'foo'.byteindex('o', -2) # => 1
'foo'.byteinde... -
String
# byterindex(pattern , offset = self . bytesize) -> Integer | nil (17302.0) -
文字列のバイト単位のインデックス offset から左に向かって pattern を探索します。 最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。 見つからなければ nil を返します。
...文字列のバイト単位のインデックス offset から左に向かって pattern を探索します。
最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。
見つからなければ nil を返します。
引数 pattern は探索する部......分文字列または正規表現で指定します。
offset が負の場合は、文字列の末尾から数えた位置から探索します。
byterindex と String#byteindex とでは、探索方向だけが逆になります。
完全に左右が反転した動作をするわけではあり......mlist[String#byteindex の場合][ruby]{
p "stringstring".byteindex("ing", 1) # => 3
# ing # ここから探索を始める
# ing
# ing # 右にずらしていってここで見つかる
//}
//emlist[String#byterindex の場合][ruby]{
p "stringstring".byterindex("in... -
Object
# kind _ of?(mod) -> bool (17209.0) -
オブジェクトが指定されたクラス mod かそのサブクラスのインスタンスであるとき真を返します。
...ジュール mod をインクルードしたクラスかそのサブクラス
のインスタンスである場合にも真を返します。
Module#includeだけではなく、Object#extendやModule#prependに
よってサブクラスのインスタンスになる場合も含みます。
上記の......ンスです。
//emlist[][ruby]{
module M
end
class C < Object
include M
end
class S < C
end
obj = S.new
p obj.is_a?(S) # true
p obj.is_a?(C) # true
p obj.is_a?(Object) # true
p obj.is_a?(M) # true
p obj.is_a?(Hash) # false
//}
@see Object#instance_of?,Module#===,Object#c... -
Encoding
:: UTF8 _ SOFTBANK -> Encoding (17202.0) -
UTF8-SoftBank エンコーディングです。
...UTF8-SoftBank エンコーディングです。
UTF-8 の亜種です。
SoftBank の携帯電話で使われる絵文字が含まれています。
@see http://creation.mb.softbank.jp/mc/tech/tech_pic/pic_index.html... -
Encoding
:: UTF8 _ SoftBank -> Encoding (17202.0) -
UTF8-SoftBank エンコーディングです。
...UTF8-SoftBank エンコーディングです。
UTF-8 の亜種です。
SoftBank の携帯電話で使われる絵文字が含まれています。
@see http://creation.mb.softbank.jp/mc/tech/tech_pic/pic_index.html...