クラス
-
ARGF
. class (84) - Array (1107)
- BasicObject (120)
- Binding (77)
- Class (24)
- Complex (48)
- Data (15)
- Dir (36)
-
Encoding
:: Converter (120) -
Encoding
:: InvalidByteSequenceError (24) - Enumerator (132)
-
Enumerator
:: Lazy (178) -
Enumerator
:: Yielder (24) - Exception (56)
- FalseClass (24)
- Fiber (38)
-
File
:: Stat (168) - Float (84)
- FrozenError (6)
- Hash (477)
- IO (44)
- Integer (273)
- MatchData (94)
- Method (176)
- Module (484)
- Mutex (4)
- NilClass (24)
- Numeric (187)
- Object (531)
- Proc (80)
- Random (24)
- Range (307)
- Rational (48)
- Regexp (93)
-
RubyVM
:: AbstractSyntaxTree :: Node (49) -
RubyVM
:: InstructionSequence (130) - Set (18)
- String (1004)
- Struct (169)
- Symbol (65)
- Thread (206)
-
Thread
:: Backtrace :: Location (84) -
Thread
:: ConditionVariable (20) -
Thread
:: Mutex (40) -
Thread
:: Queue (50) -
Thread
:: SizedQueue (30) - Time (72)
- TracePoint (134)
- TrueClass (36)
- UnboundMethod (120)
- UncaughtThrowError (22)
モジュール
- Comparable (87)
- Enumerable (1424)
- GC (12)
キーワード
- != (12)
- !~ (12)
- % (12)
- & (12)
- ** (11)
- + (24)
- < (58)
- << (50)
- <= (58)
- <=> (24)
- == (219)
- === (80)
- =~ (9)
- > (58)
- >= (58)
- >> (26)
- [] (168)
- []= (60)
- ^ (36)
-
_ _ id _ _ (12) -
_ _ send _ _ (24) -
_ dump (12) -
abort
_ on _ exception (12) -
abort
_ on _ exception= (12) - abs (45)
- abs2 (24)
-
absolute
_ path (24) -
add
_ trace _ func (12) -
alias
_ method (4) - alive? (4)
- all? (53)
- allbits? (8)
- any? (62)
- anybits? (8)
- append (8)
-
append
_ as _ bytes (1) - arity (24)
- assoc (12)
- at (12)
- attr (12)
-
attr
_ accessor (4) -
attr
_ reader (4) -
attr
_ writer (4) - backtrace (24)
-
backtrace
_ locations (36) -
base
_ label (24) - begin (24)
- between? (12)
-
bind
_ call (12) - binding (24)
- binmode (12)
- birthtime (12)
-
bit
_ length (12) - blksize (12)
- blocks (12)
- broadcast (10)
- bsearch (48)
-
bsearch
_ index (20) - bytebegin (2)
- byteend (2)
- byteindex (3)
- byteoffset (6)
- byterindex (3)
- bytes (36)
- bytesize (12)
- byteslice (36)
- call (24)
-
callee
_ id (12) - casecmp (12)
- casecmp? (18)
- casefold? (12)
- chain (7)
- chardev? (12)
- chars (12)
- children (7)
- chunk (12)
-
chunk
_ while (12) - clamp (15)
-
class
_ eval (12) -
class
_ exec (12) -
class
_ variable _ defined? (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) -
class
_ variables (12) - clone (12)
- closed? (34)
- codepoints (12)
- collect (36)
-
collect
_ concat (36) - combination (24)
- compact (4)
-
compare
_ by _ identity (12) -
compare
_ by _ identity? (12) - concat (18)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ source _ location (12) - constants (12)
- convert (12)
- count (48)
- cover? (19)
- curry (46)
- cycle (48)
- deconstruct (9)
- delete (24)
-
delete
_ at (12) - deq (20)
- detect (24)
- dig (20)
- digits (12)
- directory? (12)
- disable (24)
- disasm (12)
- disassemble (12)
- drop (12)
-
drop
_ while (24) - dump (12)
- each (60)
-
each
_ byte (36) -
each
_ char (12) -
each
_ codepoint (12) -
each
_ cons (24) -
each
_ entry (24) -
each
_ grapheme _ cluster (8) -
each
_ key (12) -
each
_ pair (36) -
each
_ slice (24) -
each
_ value (12) -
each
_ with _ index (24) -
each
_ with _ object (24) - empty? (34)
- enable (24)
- encode (36)
- end (12)
-
end
_ with? (12) - entries (19)
-
enum
_ for (36) - eof (12)
- eof? (12)
- eql? (159)
- equal? (36)
-
error
_ bytes (12) - eval (24)
- even? (12)
- event (12)
-
exclude
_ end? (12) -
executable
_ real? (12) - feed (12)
- fetch (44)
-
fetch
_ values (2) - filter (49)
- filter! (28)
-
filter
_ map (12) - find (24)
-
find
_ all (24) -
find
_ index (36) - finish (12)
- finite? (9)
- first (60)
-
first
_ column (7) -
first
_ lineno (19) -
fixed
_ encoding? (12) -
flat
_ map (36) - force (12)
- freeze (12)
- friday? (12)
- frozen? (12)
-
garbage
_ collect (12) - getbyte (24)
- getc (12)
-
grapheme
_ clusters (8) - grep (24)
-
grep
_ v (24) -
group
_ by (24) - grpowned? (12)
- gsub (48)
- gsub! (48)
- hash (48)
-
ignore
_ deadlock= (4) - include? (48)
-
incomplete
_ input? (12) - inherited (12)
- initialize (12)
- inject (36)
- insert (12)
-
insert
_ output (12) - inspect (97)
-
instance
_ eval (12) -
instance
_ exec (12) -
instance
_ methods (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)
-
keep
_ if (43) - key? (12)
- label (24)
- lambda? (12)
- last (36)
-
last
_ column (7) -
last
_ lineno (7) - lazy (12)
- lineno (12)
-
local
_ variable _ defined? (12) -
local
_ variable _ get (12) -
local
_ variable _ set (12) -
local
_ variables (11) - locked? (10)
- magnitude (45)
- map (36)
-
marshal
_ dump (12) -
marshal
_ load (12) - match (36)
- match? (27)
- max (130)
-
max
_ by (48) - member? (39)
- members (15)
- merge (24)
- merge! (24)
-
method
_ defined? (12) -
method
_ id (12) -
method
_ missing (12) - methods (12)
- min (130)
-
min
_ by (48) - minmax (48)
-
minmax
_ by (24) -
module
_ eval (12) -
module
_ exec (12) -
module
_ function (12) - name (17)
-
named
_ captures (12) - negative? (19)
- new (12)
- next (24)
- next! (12)
- nobits? (8)
- none? (53)
- nonzero? (12)
-
object
_ id (12) - oct (12)
- odd? (12)
- one? (53)
-
original
_ name (24) - overlap? (2)
- owned? (10)
- owner (12)
- pack (21)
- parameters (31)
- partition (24)
- path (24)
- peek (12)
- permutation (12)
- pop (32)
- pos= (12)
- positive? (19)
- pow (22)
- pread (8)
- prepend (20)
-
prepend
_ features (12) -
primitive
_ convert (48) - priority (12)
- priority= (12)
- private (48)
-
private
_ instance _ methods (12) -
private
_ method _ defined? (12) -
proper
_ subset? (3) -
proper
_ superset? (3) -
protected
_ method _ defined? (12) - public (36)
-
public
_ method _ defined? (12) -
public
_ send (24) - push (12)
- putback (24)
- raise (18)
- rassoc (12)
- readable? (12)
-
readable
_ real? (12) - readbyte (24)
- real? (12)
- receiver (29)
- reduce (36)
- regexp (12)
- rehash (12)
- reject (36)
-
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) -
respond
_ to? (12) -
respond
_ to _ missing? (12) - resume (12)
-
return
_ value (12) -
reverse
_ each (48) - rewind (12)
- rotate (12)
- rotate! (12)
-
ruby2
_ keywords (18) - sample (24)
- saturday? (12)
- scan (24)
- scrub (36)
- scrub! (36)
- seek (12)
- select (79)
- select! (43)
- self (12)
- send (24)
-
set
_ backtrace (12) -
set
_ trace _ func (12) - setbyte (12)
- shift (32)
- signal (10)
-
singleton
_ method _ removed (12) -
singleton
_ methods (12) - slice (84)
- slice! (48)
-
slice
_ after (35) -
slice
_ before (60) -
slice
_ when (23) - sort (48)
- sort! (24)
-
sort
_ by (24) -
sort
_ by! (24) -
source
_ location (19) - split (19)
-
start
_ with? (18) - step (62)
- stop? (12)
- store (12)
- strftime (12)
- sub (36)
- sub! (36)
- subsec (12)
- subset? (3)
- subtract (3)
- succ (12)
- succ! (12)
- sum (54)
- superset? (3)
- synchronize (12)
- tag (11)
- take (12)
-
take
_ while (48) - tally (10)
- then (7)
-
thread
_ variable _ set (12) - thursday? (12)
-
to
_ a (55) -
to
_ ary (12) -
to
_ binary (10) -
to
_ enum (36) -
to
_ h (36) -
to
_ i (12) -
to
_ int (12) -
to
_ proc (24) -
to
_ regexp (12) -
to
_ s (86) -
to
_ set (6) -
to
_ str (12) -
to
_ sym (12) - transfer (4)
-
transform
_ keys (20) -
transform
_ keys! (20) -
transform
_ values (18) -
transform
_ values! (18) - trust (9)
-
try
_ lock (12) - type (7)
-
unicode
_ normalized? (11) - union (7)
- uniq (24)
- unpack (12)
- unpack1 (9)
- unshift (12)
- untrust (9)
- untrusted? (9)
- update (24)
- upto (12)
-
valid
_ encoding? (12) - value (11)
- values (12)
-
values
_ at (36) -
with
_ index (36) -
with
_ object (24) -
world
_ readable? (12) -
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) - yield (12)
-
yield
_ self (8) - zero? (36)
- zip (72)
- | (36)
検索結果
先頭5件
-
String
# b -> String (21216.0) -
self の文字エンコーディングを ASCII-8BIT にした文字列の複製を返します。
...self の文字エンコーディングを ASCII-8BIT にした文字列の複製を返します。
//emlist[例][ruby]{
'abc123'.encoding # => #<Encoding:UTF-8>
'abc123'.b.encoding # => #<Encoding:ASCII-8BIT>
//}... -
Module
# ruby2 _ keywords(method _ name , . . . ) -> nil (18334.0) -
For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.
...For the given method names, marks the method as passing keywords through
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword argument......ash argument is marked with a special
flag such that if it is the final element of a normal argument splat to
another method call, and that method call does not include explicit
keywords or a keyword splat, the final element is interpreted as
keywords. In other words, keywords will be passed through......er methods.
This should only be used for methods that delegate keywords to another
method, and only for backwards compatibility with Ruby versions before
2.7.
This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
be... -
Proc
# ruby2 _ keywords -> proc (18334.0) -
Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the proc to other methods.
...Marks the proc as passing keywords through a normal argument splat. This
should only be called on procs that accept an argument splat (`*args`)
but not explicit keywords or a keyword splat. It marks the proc such
that if the proc is called with keyword arguments, the final hash
argument is marked......ormal argument splat to another method call, and that
method call does not include explicit keywords or a keyword splat, the
final element is interpreted as keywords. In other words, keywords will
be passed through the proc to other methods.
This should only be used for procs that delegate keyword......er
method, and only for backwards compatibility with Ruby versions before
2.7.
This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the proc responds to this method before calling
it. Also, be... -
File
:: Stat # readable _ real? -> bool (18309.0) -
実ユーザ/実グループによって読み込み可能な時に真を返します。
...実ユーザ/実グループによって読み込み可能な時に真を返します。
//emlist[][ruby]{
p File::Stat.new($0).readable_real? #=> true
//}... -
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (18221.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
...て返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data メソッ......o_binary で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキテクチャのRubyで作られたバイナリデータは使用できません。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.to_binary......("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\x00\... -
Encoding
:: InvalidByteSequenceError # error _ bytes -> String (18209.0) -
エラー発生時に捨てられたバイト列を返します。
...][ruby]{
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
begin
ec.convert("abc\xA1\xFFdef")
rescue Encoding::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenceError: "\xA1" followed by "\xFF" on EUC-JP>
puts $!.error_bytes.dump #=> "\xA1"
puts $!.readagain_byte......s.dump #=> "\xFF"
end
//}
@see Encoding::InvalidByteSequenceError#readagain_bytes... -
String
# byterindex(pattern , offset = self . bytesize) -> Integer | nil (15321.0) -
文字列のバイト単位のインデックス offset から左に向かって pattern を探索します。 最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。 見つからなければ nil を返します。
...ンデックス offset から左に向かって pattern を探索します。
最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。
見つからなければ nil を返します。
引数 pattern は探索する部分文字列または正規表現......で指定します。
offset が負の場合は、文字列の末尾から数えた位置から探索します。
byterindex と String#byteindex とでは、探索方向だけが逆になります。
完全に左右が反転した動作をするわけではありません。
探索はその開始......emlist[String#byteindex の場合][ruby]{
p "stringstring".byteindex("ing", 1) # => 3
# ing # ここから探索を始める
# ing
# ing # 右にずらしていってここで見つかる
//}
//emlist[String#byterindex の場合][ruby]{
p "stringstring".byterindex("i... -
Thread
# thread _ variable _ set(key , value) (15215.0) -
引数 key で指定した名前のスレッドローカル変数に引数 value をセットしま す。
...hread#[] でセットしたローカル変数(Fiber ローカル変数)と
異なり、セットした変数は Fiber を切り替えても共通で使える事に注意してく
ださい。
//emlist[例][ruby]{
thr = Thread.new do
Thread.current.thread_variable_set(:cat, 'meow')
Thread.curre......nt.thread_variable_set("dog", 'woof')
end
thr.join # => #<Thread:0x401b3f10 dead>
thr.thread_variables # => [:dog, :cat]
//}
@see Thread#thread_variable_get, Thread#[]... -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (15203.0) -
self が表す命令シーケンスの絶対パスを返します。
...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, wor......ld"
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 (15203.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......lo, world"
end
# 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::Instructio......nSequence#label...