クラス
-
ARGF
. class (218) - Array (1107)
- BasicObject (120)
- Bignum (69)
- Binding (86)
- Class (24)
- Complex (108)
- Data (15)
- Dir (36)
-
Encoding
:: Converter (120) -
Encoding
:: InvalidByteSequenceError (84) - Enumerator (132)
-
Enumerator
:: ArithmeticSequence (21) -
Enumerator
:: Chain (14) -
Enumerator
:: Lazy (187) -
Enumerator
:: Yielder (24) - Exception (56)
- FalseClass (24)
- Fiber (38)
- File (11)
-
File
:: Stat (168) - Fixnum (60)
- Float (84)
- FrozenError (6)
- Hash (477)
- IO (171)
- Integer (273)
- KeyError (16)
- LocalJumpError (24)
- MatchData (94)
- Method (176)
- Module (520)
- Mutex (4)
- NameError (32)
- NilClass (24)
- NoMethodError (21)
- Numeric (187)
- Object (567)
- Proc (80)
-
Process
:: Status (72) - Random (24)
- Range (307)
- Rational (48)
- Regexp (93)
-
RubyVM
:: AbstractSyntaxTree :: Node (49) -
RubyVM
:: InstructionSequence (130) - Set (21)
- StopIteration (12)
- String (1026)
- Struct (181)
- Symbol (305)
- Thread (306)
-
Thread
:: Backtrace :: Location (84) -
Thread
:: ConditionVariable (30) -
Thread
:: Mutex (40) -
Thread
:: Queue (50) -
Thread
:: SizedQueue (68) - ThreadGroup (12)
- Time (72)
- TracePoint (146)
- TrueClass (36)
- UnboundMethod (143)
- UncaughtThrowError (22)
モジュール
- Comparable (87)
- Enumerable (1424)
- GC (12)
キーワード
- != (12)
- !~ (12)
- % (18)
- & (18)
- * (6)
- ** (17)
- + (30)
- - (6)
- -@ (3)
-
/ (6) - < (73)
- << (60)
- <= (73)
- <=> (27)
- == (256)
- === (83)
- =~ (21)
- > (73)
- >= (73)
- >> (26)
- [] (228)
- []= (60)
- ^ (42)
-
_ _ 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? (16)
- all? (53)
- allbits? (8)
- any? (62)
- anybits? (8)
- append (8)
-
append
_ as _ bytes (1) - args (12)
- arity (24)
-
ascii
_ only? (12) - assoc (12)
- at (12)
- attr (12)
-
attr
_ accessor (4) -
attr
_ reader (4) -
attr
_ writer (4) - backtrace (24)
-
backtrace
_ locations (36) -
base
_ label (24) - begin (31)
- between? (12)
-
bind
_ call (12) - binding (24)
- binmode (12)
- binmode? (12)
- birthtime (23)
-
bit
_ length (18) - blksize (12)
- blocks (12)
- broadcast (10)
- bsearch (48)
-
bsearch
_ index (20) - bytebegin (2)
- byteend (2)
- byteindex (3)
- byteoffset (6)
- byterindex (3)
- bytes (57)
- bytesize (12)
- byteslice (36)
- bytesplice (10)
- call (24)
-
callee
_ id (12) - casecmp (12)
- casecmp? (18)
- casefold? (12)
- chain (7)
- chardev? (12)
- chars (12)
- children (7)
- chunk (12)
-
chunk
_ while (21) - clamp (27)
-
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)
- coredump? (12)
- count (48)
- cover? (19)
- curry (46)
- cycle (48)
- deconstruct (9)
- delete (24)
-
delete
_ at (12) - deq (20)
-
destination
_ encoding (12) -
destination
_ encoding _ name (12) - detect (24)
- dig (20)
- digits (12)
- directory? (12)
- disable (24)
- disasm (12)
- disassemble (12)
- div (6)
- divmod (3)
- drop (12)
-
drop
_ while (24) - dump (12)
- each (67)
-
each
_ byte (60) -
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? (42)
- enable (24)
- enabled? (12)
- enclosed? (12)
- encode (36)
- end (12)
-
end
_ with? (12) - enq (10)
- entries (19)
-
enum
_ for (36) - eof (24)
- eof? (24)
- eql? (162)
- equal? (48)
-
error
_ bytes (12) - eval (24)
- even? (12)
- event (12)
-
exclude
_ end? (19) -
executable
_ real? (12) -
exit
_ value (12) - exited? (12)
- fdiv (3)
- 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 (36)
- getc (12)
-
grapheme
_ clusters (8) - grep (24)
-
grep
_ v (24) -
group
_ by (24) - grpowned? (12)
- gsub (48)
- gsub! (48)
- hash (51)
- id2name (12)
-
ignore
_ deadlock (4) -
ignore
_ deadlock= (4) - include? (48)
-
incomplete
_ input? (12) - inherited (12)
- initialize (12)
- inject (36)
- insert (12)
-
insert
_ output (12) - inspect (115)
-
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 (24)
- intersect? (7)
- intersection (6)
- invert (12)
- irb (9)
-
keep
_ if (43) - key (8)
- key? (12)
- keys (12)
- label (24)
- lambda? (12)
- last (36)
-
last
_ column (7) -
last
_ lineno (7) - lazy (12)
- length (12)
- lineno (12)
- lineno= (24)
-
local
_ variable _ defined? (12) -
local
_ variable _ get (12) -
local
_ variable _ set (12) -
local
_ variables (21) - locked? (10)
- magnitude (45)
- map (36)
-
marshal
_ dump (12) -
marshal
_ load (12) - match (48)
- 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) - modulo (6)
- name (29)
-
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 (43)
- partition (24)
- path (24)
- peek (12)
-
pending
_ interrupt? (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
_ call? (9) -
private
_ instance _ methods (12) -
private
_ method _ defined? (12) -
private
_ methods (12) -
proper
_ subset? (3) -
proper
_ superset? (3) - protected (12)
-
protected
_ instance _ methods (12) -
protected
_ method _ defined? (12) -
protected
_ methods (12) - public (36)
-
public
_ instance _ methods (12) -
public
_ method _ defined? (12) -
public
_ methods (12) -
public
_ send (24) - push (22)
- putback (24)
- putc (12)
- raise (30)
- rassoc (12)
- read (12)
-
read
_ nonblock (24) - readable? (12)
-
readable
_ real? (12) -
readagain
_ bytes (12) - readbyte (24)
- readpartial (24)
- real? (12)
- reason (12)
- receiver (47)
- reduce (36)
- regexp (12)
- rehash (12)
- reject (36)
- remainder (3)
-
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) - result (12)
- resume (12)
-
return
_ value (12) -
reverse
_ each (48) - rewind (19)
- 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
_ encoding (48) -
set
_ trace _ func (12) - setbyte (12)
- shift (32)
- signal (10)
- signaled? (12)
-
singleton
_ method _ removed (12) -
singleton
_ methods (12) - size (12)
- slice (144)
- slice! (48)
-
slice
_ after (35) -
slice
_ before (60) -
slice
_ when (23) - sort (48)
- sort! (24)
-
sort
_ by (24) -
sort
_ by! (24) -
source
_ encoding (12) -
source
_ encoding _ name (12) -
source
_ location (19) - split (19)
-
start
_ with? (18) - status (12)
- step (62)
- stop? (12)
- stopped? (12)
- store (12)
- strftime (12)
- sub (36)
- sub! (36)
- subsec (12)
- subset? (3)
- subtract (3)
- succ (12)
- succ! (12)
- success? (12)
- sum (54)
-
super
_ method (11) - superset? (3)
- synchronize (12)
- sysread (12)
- tag (11)
- take (12)
-
take
_ while (48) - tally (10)
- then (7)
-
thread
_ variable? (12) -
thread
_ variable _ get (12) -
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 (104) -
to
_ set (6) -
to
_ str (12) -
to
_ sym (24) - 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 (23)
- values (12)
-
values
_ at (36) - wait (10)
-
with
_ index (36) -
with
_ object (24) -
world
_ readable? (12) -
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) -
write
_ nonblock (12) - yield (12)
-
yield
_ self (8) - zero? (39)
- zip (72)
- | (42)
検索結果
先頭5件
-
String
# b -> String (21210.0) -
self の文字エンコーディングを ASCII-8BIT にした文字列の複製を返します。
...self の文字エンコーディングを ASCII-8BIT にした文字列の複製を返します。
//emlist[例][ruby]{
'abc123'.encoding # => #<Encoding:UTF-8>
'abc123'.b.encoding # => #<Encoding:ASCII-8BIT>
//}... -
File
:: Stat # readable _ real? -> bool (18303.0) -
実ユーザ/実グループによって読み込み可能な時に真を返します。
...実ユーザ/実グループによって読み込み可能な時に真を返します。
//emlist[][ruby]{
p File::Stat.new($0).readable_real? #=> true
//}... -
Encoding
:: InvalidByteSequenceError # error _ bytes -> String (18203.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 (15303.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... -
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (15209.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\... -
Thread
# thread _ variable _ set(key , value) (15209.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#[]... -
Encoding
:: InvalidByteSequenceError # readagain _ bytes -> String (15203.0) -
エラー発生時に読み直さなければならないバイト列を返します。
...エラー発生時に読み直さなければならないバイト列を返します。
@see Encoding::InvalidByteSequenceError#error_bytes... -
Thread
# thread _ variable?(key) -> bool (15203.0) -
引数 key で指定した名前のスレッドローカル変数が存在する場合に true、そ うでない場合に false を返します。
...に true、そ
うでない場合に false を返します。
@param key 変数名を String か Symbol で指定します。
me = Thread.current
me.thread_variable_set(:oliver, "a")
me.thread_variable?(:oliver) # => true
me.thread_variable?(:stanley) # => false
[注意]: Thread#......[] でセットしたローカル変数(Fiber ローカル変数)が
対象ではない事に注意してください。
@see Thread#thread_variable_get, Thread#[]... -
Thread
# thread _ variable _ get(key) -> object | nil (15203.0) -
引数 key で指定した名前のスレッドローカル変数を返します。
...]: Thread#[] でセットしたローカル変数(Fiber ローカル変数)と
異なり、Fiber を切り替えても同じ変数を返す事に注意してください。
例:
Thread.new {
Thread.current.thread_variable_set("foo", "bar") # スレッドローカル
Thread.current["foo"......] = "bar" # Fiber ローカル
Fiber.new {
Fiber.yield [
Thread.current.thread_variable_get("foo"), # スレッドローカル
Thread.current["foo"], # Fiber ローカル
]
}.resume
}.join.value # => ['bar', nil]
この......例の "bar" は Thread#thread_variable_get により得られ
た値で、nil はThread#[] により得られた値です。
@see Thread#thread_variable_set, Thread#[]
@see https://magazine.rubyist.net/articles/0041/0041-200Special-note.html... -
IO
# write _ nonblock(string , exception: true) -> Integer | :wait _ writable (12503.0) -
IO をノンブロッキングモードに設定し、string を write(2) システムコールで書き出します。
...し、string を write(2) システムコールで書き出します。
write(2) が成功した場合、書き込んだ長さを返します。
EAGAIN, EINTR などは例外 Errno::EXXX として呼出元に報告されます。
書き込んだバイト数(つまり返り値)は String#bytesize......た例外 がErrno::EAGAIN、 Errno::EWOULDBLOCK である場合は、
その例外オブジェクトに IO::WaitWritable が Object#extend
されます。よって IO::WaitWritable を write_nonblock のリトライが必要
かの判定に用いることができます。
@param string 自身に......@param exception false を指定すると、書き込み時に Errno::EAGAIN、Errno::EWOULDBLOCK が発生
する代わりに :wait_writable を返します。
@raise IOError 自身が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX writ...