別のキーワード
ライブラリ
- ビルトイン (5517)
- abbrev (12)
- bigdecimal (156)
- csv (72)
- date (12)
-
io
/ wait (12) - json (24)
- kconv (12)
- matrix (287)
- openssl (48)
- optparse (264)
- pathname (228)
- pp (12)
- prime (60)
- psych (24)
- rake (72)
- resolv (12)
-
rexml
/ document (120) -
rubygems
/ version (48) - set (9)
- stringio (100)
- strscan (72)
- thread (4)
- win32ole (12)
クラス
-
ARGF
. class (96) - Array (715)
- BasicObject (60)
- BigDecimal (156)
- Binding (30)
- CSV (12)
-
CSV
:: Row (24) -
CSV
:: Table (12) - Class (12)
- Complex (66)
- Data (12)
- Date (12)
- Dir (104)
- Enumerator (24)
- Exception (24)
- Fiber (30)
- File (24)
-
File
:: Stat (12) - Float (24)
- FrozenError (6)
-
Gem
:: Version (48) - Hash (186)
- IO (222)
- Integer (531)
-
JSON
:: State (24) - MatchData (72)
- Matrix (239)
-
Matrix
:: LUPDecomposition (12) - Method (46)
- Module (188)
- Mutex (2)
- Numeric (347)
- Object (116)
-
OpenSSL
:: BN (36) - OptionParser (240)
- Pathname (228)
-
Prime
:: PseudoPrimeGenerator (48) - Proc (24)
-
Psych
:: Stream (24) -
REXML
:: Attributes (36) -
REXML
:: Child (24) -
REXML
:: Element (60) -
Rake
:: FileList (72) - Random (24)
- Range (77)
- Rational (87)
- Refinement (4)
- Regexp (12)
-
Resolv
:: DNS :: Name (12) -
RubyVM
:: AbstractSyntaxTree :: Node (42) -
RubyVM
:: InstructionSequence (120) - Set (12)
- SignalException (24)
- String (1477)
- StringIO (100)
- StringScanner (72)
- Struct (70)
- Symbol (30)
- Thread (39)
-
Thread
:: Backtrace :: Location (72) -
Thread
:: ConditionVariable (24) -
Thread
:: Mutex (10) -
Thread
:: SizedQueue (10) - ThreadGroup (12)
- Time (60)
- TracePoint (84)
- UnboundMethod (36)
- UncaughtThrowError (11)
- Vector (36)
-
WIN32OLE
_ TYPE (12)
モジュール
- Comparable (21)
- Enumerable (295)
-
OptionParser
:: Arguable (24)
キーワード
- != (12)
- % (31)
- * (24)
- ** (12)
- + (24)
- +@ (22)
- -@ (31)
- < (24)
- << (24)
- <= (24)
- <=> (150)
- == (60)
- === (36)
- =~ (12)
- > (24)
- >= (24)
- [] (96)
- []= (91)
-
_ dump (12) - abbrev (12)
- abs (24)
- abs2 (12)
-
absolute
_ path (24) -
add
_ namespace (24) -
alias
_ method (8) - allbits? (8)
-
angle
_ with (12) - anybits? (8)
-
append
_ as _ bytes (1) - autoload (12)
- b (12)
-
backtrace
_ locations (24) -
base
_ label (24) - between? (12)
-
bind
_ call (12) - binmode (12)
- binread (12)
-
bit
_ length (12) - broadcast (12)
- bsearch (24)
-
bsearch
_ index (20) - byterindex (3)
- bytes (38)
- capitalize! (12)
- casecmp (12)
- casecmp? (9)
- ceil (24)
- ceildiv (3)
- center (12)
- chars (24)
- children (26)
- chomp (12)
- chomp! (12)
- chop! (12)
- chown (12)
- chr (36)
-
chunk
_ while (12) - clamp (9)
-
class
_ eval (12) - clear (24)
-
clear
_ bit! (12) -
clear
_ exclude (12) - close (10)
- closed? (12)
- codepoints (24)
- coerce (60)
- collect! (38)
- column (24)
- combination (24)
- compact! (12)
-
compare
_ by _ identity (12) - concat (33)
- configure (12)
- conj (12)
- conjugate (12)
- count (12)
- covector (12)
- crypt (12)
- curry (11)
-
deconstruct
_ keys (3) - dedup (3)
-
default
_ event _ sources (12) -
defined
_ class (12) - delete (36)
- delete! (12)
-
delete
_ if (60) -
delete
_ prefix! (8) -
delete
_ suffix! (8) - difference (7)
- dig (20)
- digits (24)
- dirname (12)
- disable (24)
- disasm (12)
- disassemble (12)
- div (12)
- divmod (36)
- downcase! (12)
- downto (24)
- each (189)
-
each
_ byte (60) -
each
_ char (48) -
each
_ child (38) -
each
_ codepoint (60) -
each
_ cons (4) -
each
_ entry (12) -
each
_ grapheme _ cluster (16) -
each
_ index (24) -
each
_ line (141) -
each
_ pair (48) -
each
_ slice (8) -
each
_ with _ index (72) - eigen (12)
- eigensystem (12)
- enable (24)
- encode (36)
- encode! (24)
-
end
_ with? (12) - entries (19)
-
enum
_ for (24) - eql? (24)
- equal? (12)
- eval (24)
- exception (12)
- existing! (12)
- fdiv (36)
-
fetch
_ values (2) - fileno (11)
- fill (72)
- filter! (28)
- finite? (9)
-
first
_ column (7) -
first
_ lineno (19) - flatten (12)
- flatten! (12)
- floor (36)
-
force
_ encoding (12) - friday? (12)
- gcd (12)
- gcdlcm (12)
- getbyte (12)
- getc (12)
-
grapheme
_ clusters (16) - gsub! (60)
- hash (36)
- hex (12)
- hstack (12)
- import (12)
-
import
_ methods (4) - included (12)
- infinite? (9)
- inherited (12)
- inject (36)
- insert (24)
- inspect (130)
-
instance
_ eval (12) -
instance
_ exec (12) - iseuc (12)
-
keep
_ if (43) - label (24)
-
last
_ column (7) -
last
_ lineno (7) - lcm (12)
- length (12)
- lineno (12)
- lines (38)
- list (12)
- ljust (12)
- lstrip! (12)
- lup (12)
-
lup
_ decomposition (12) - magnitude (24)
- map! (38)
- match (24)
- match? (9)
-
max
_ by (48) - merge (12)
- minor (24)
-
mod
_ inverse (12) -
module
_ eval (12) - modulo (12)
- name= (10)
- names (12)
- namespace (12)
- namespaces (24)
- negative? (19)
- next (24)
- next! (12)
-
next
_ sibling= (12) - nobits? (8)
- nonzero? (24)
- offset (24)
- on (144)
-
on
_ head (12) -
on
_ tail (12) - ord (12)
- order! (24)
- parse! (12)
-
parse
_ csv (12) - partition (12)
- path (36)
- permutation (24)
- permute! (12)
- polar (12)
- pos= (12)
- positive? (19)
- pow (24)
- pred (12)
- prefixes (24)
- prerelease? (12)
-
pretty
_ print (12) -
previous
_ sibling= (12) -
prime
_ division (12) -
private
_ class _ method (24) -
private
_ constant (12) - product (24)
- public (36)
- quo (12)
- raise (18)
- rand (24)
- rationalize (12)
- readlines (12)
- realpath (24)
- receiver (17)
- rect (12)
- rectangular (12)
- reduce (36)
- reject (24)
- reject! (60)
- relative? (12)
-
relative
_ path _ from (12) - release (12)
- remainder (36)
- reopen (36)
-
repeated
_ combination (24) -
repeated
_ permutation (24) - replace (12)
- reset (12)
- resolve (12)
- resume (12)
- reverse! (12)
-
reverse
_ each (12) - rewind (24)
- rindex (12)
- rjust (12)
- round (12)
- row (24)
- rpartition (12)
- rshift! (12)
- rstrip! (12)
-
safe
_ level (5) - sample (24)
- saturday? (12)
- scan (24)
- scrub (36)
- scrub! (36)
- seek (12)
- select! (38)
- signal (12)
- signm (12)
- signo (12)
-
singleton
_ methods (12) - size (25)
- skip (12)
- slice (72)
-
slice
_ when (12) - solve (12)
- sort (24)
- sort! (24)
-
sort
_ by (24) -
sort
_ by! (12) -
source
_ location (7) - split (26)
- squeeze! (12)
- start (24)
-
start
_ with? (18) - step (112)
- strip! (12)
- sub! (48)
-
subdomain
_ of? (12) - succ (24)
- succ! (12)
- sum (24)
- summarize (24)
-
super
_ method (11) - swapcase! (12)
- synchronize (12)
- terminate (12)
- thursday? (12)
- times (24)
-
to
_ a (19) -
to
_ bn (12) -
to
_ c (12) -
to
_ csv (12) -
to
_ enum (24) -
to
_ f (12) -
to
_ h (19) -
to
_ i (12) -
to
_ int (24) -
to
_ path (12) -
to
_ proc (12) -
to
_ s (122) -
to
_ str (12) -
tr
_ s! (12) -
transform
_ keys! (20) -
transform
_ values! (18) - truncate (12)
- undump (8)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - union (7)
- uniq (48)
- uniq! (24)
- unlink (12)
- unscan (12)
- unshift (12)
- upcase! (12)
- upto (36)
- vstack (12)
-
wait
_ readable (12) - with (3)
-
with
_ index (24) -
yield
_ self (8) - zero? (12)
- zip (48)
- ~ (12)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # first _ lineno -> Integer (24217.0) -
self が表す命令シーケンスの 1 行目の行番号を返します。
...
self が表す命令シーケンスの 1 行目の行番号を返します。
例1:irb で実行した場合
RubyVM::InstructionSequence.compile('num = 1 + 2').first_lineno
# => 1
例2:
# /tmp/method.rb
require "foo-library"
def foo
p :foo
end
RubyVM::InstructionSequence.of(m......ethod(:foo)).first_lineno
# => 2... -
TracePoint
# self -> object (24126.0) -
イベントを発生させたオブジェクトを返します。
...イベントを発生させたオブジェクトを返します。
以下のようにする事で同じ値を取得できます。
//emlist[例][ruby]{
trace.binding.eval('self')
//}
@see TracePoint#binding......返します。
以下のようにする事で同じ値を取得できます。
なお、self メソッドは binding が nil になる :c_call および :c_return イベントに対しても正しく動作します。
//emlist[例][ruby]{
trace.binding.eval('self')
//}
@see TracePoint#binding... -
RubyVM
:: InstructionSequence # inspect -> String (21329.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
...
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#labe......l,
RubyVM::InstructionSequence#path... -
Numeric
# i -> Complex (21178.0) -
Complex(0, self) を返します。
...Complex(0, self) を返します。
ただし、Complex オブジェクトでは利用できません。
//emlist[例][ruby]{
10.i # => (0+10i)
-10.i # => (0-10i)
(0.1).i # => (0+0.1i)
Rational(1, 2).i # => (0+(1/2)*i)
//}... -
Rational
# rationalize(eps = 0) -> Rational (18443.0) -
自身から eps で指定した許容誤差の範囲に収まるような Rational を返 します。
...うな Rational を返
します。
eps を省略した場合は self を返します。
@param eps 許容する誤差
//emlist[例][ruby]{
r = Rational(5033165, 16777216)
r.rationalize # => (5033165/16777216)
r.rationalize(Rational(0.01)) # => (3/10)
r.rationalize(Rational(0.... -
String
# byterindex(pattern , offset = self . bytesize) -> Integer | nil (18438.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... -
String
# rindex(pattern , pos = self . size) -> Integer | nil (18438.0) -
文字列のインデックス pos から左に向かって pattern を探索します。 最初に見つかった部分文字列の左端のインデックスを返します。 見つからなければ nil を返します。
...字列のインデックス pos から左に向かって pattern を探索します。
最初に見つかった部分文字列の左端のインデックスを返します。
見つからなければ nil を返します。
引数 pattern は探索する部分文字列または正規表現で指定......します。
pos が負の場合は、文字列の末尾から数えた位置から探索します。
rindex と String#index とでは、探索方向だけが逆になります。
完全に左右が反転した動作をするわけではありません。
探索はその開始位置を右から......。
//emlist[String#index の場合][ruby]{
p "stringstring".index("ing", 1) # => 3
# ing # ここから探索を始める
# ing
# ing # 右にずらしていってここで見つかる
//}
//emlist[String#rindex の場合][ruby]{
p "stringstring".rindex("ing", -1)... -
RubyVM
:: AbstractSyntaxTree :: Node # children -> Array (18229.0) -
self の子ノードを配列で返します。
...
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 (18229.0) -
ソースコード中で、self を表すテキストが最初に現れる列番号を返します。
...ソースコード中で、self を表すテキストが最初に現れる列番号を返します。
列番号は0-originで、バイト単位で表されます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.first_column # => 0
//}... -
RubyVM
:: AbstractSyntaxTree :: Node # first _ lineno -> Integer (18229.0) -
ソースコード中で、self を表すテキストが最初に現れる行番号を返します。
...ソースコード中で、self を表すテキストが最初に現れる行番号を返します。
行番号は1-originです。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.first_lineno # => 1
//}... -
RubyVM
:: InstructionSequence # disasm -> String (18217.0) -
self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
...
self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
puts RubyVM::InstructionSequence.compile('1 + 2').disasm
出力:
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1......( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 leave
@see RubyVM::InstructionSequence.disasm...