クラス
-
ARGF
. class (216) - Array (1917)
- BasicObject (120)
- Binding (48)
- Class (40)
- Complex (306)
- Data (18)
- Dir (130)
-
Encoding
:: Converter (180) -
Encoding
:: InvalidByteSequenceError (12) - Enumerator (163)
-
Enumerator
:: Lazy (308) - Exception (68)
- FalseClass (36)
- Fiber (34)
- File (64)
-
File
:: Stat (36) - Float (320)
- FrozenError (6)
- Hash (597)
- IO (394)
- Integer (686)
- MatchData (206)
- Method (175)
- Module (720)
- Mutex (4)
- NilClass (67)
- Numeric (491)
- Object (507)
- Proc (110)
- Random (72)
- Range (381)
- Rational (291)
- Regexp (105)
-
RubyVM
:: AbstractSyntaxTree :: Node (14) -
RubyVM
:: InstructionSequence (94) - Set (33)
- String (1863)
- Struct (132)
- Symbol (65)
- Thread (208)
-
Thread
:: Backtrace :: Location (72) -
Thread
:: ConditionVariable (20) -
Thread
:: Mutex (20) -
Thread
:: Queue (30) -
Thread
:: SizedQueue (50) - ThreadGroup (12)
- Time (74)
- TracePoint (177)
- TrueClass (36)
- UnboundMethod (84)
モジュール
- Comparable (87)
- Enumerable (1254)
- GC (12)
キーワード
- != (12)
- !~ (12)
- % (62)
- & (60)
- * (84)
- ** (48)
- + (91)
- +@ (22)
- - (60)
- -@ (31)
-
/ (47) - < (58)
- << (50)
- <= (58)
- <=> (126)
- == (219)
- === (92)
- =~ (40)
- > (58)
- >= (58)
- >> (26)
- [] (228)
- []= (132)
- ^ (48)
-
_ _ id _ _ (12) -
_ _ send _ _ (24) -
_ dump (12) -
_ load (12) -
abort
_ on _ exception (12) -
abort
_ on _ exception= (12) - abs (12)
- abs2 (12)
-
absolute
_ path (24) - add (12)
-
add
_ trace _ func (12) -
alias
_ method (12) - all? (45)
- allbits? (8)
- ancestors (12)
- angle (12)
- any? (62)
- anybits? (8)
- append (8)
-
append
_ as _ bytes (1) -
append
_ features (12) - arg (24)
- assoc (24)
- at (12)
- attr (36)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) - autoload (12)
- autoload? (12)
- backtrace (12)
-
backtrace
_ locations (36) -
base
_ label (24) - begin (24)
- between? (12)
-
bind
_ call (12) - binmode (12)
- birthtime (12)
-
bit
_ length (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 (36)
-
callee
_ id (12) - capitalize (12)
- capitalize! (12)
- captures (12)
- casecmp (24)
- casecmp? (18)
- ceil (54)
- ceildiv (3)
- center (12)
- chain (7)
- chars (24)
- children (14)
- chomp (12)
- chomp! (12)
- chop (12)
- chop! (12)
- chown (12)
- chr (36)
- chunk (36)
-
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)
- close (24)
-
close
_ read (12) -
close
_ write (12) - closed? (24)
- codepoints (24)
- coerce (36)
- collect (60)
- collect! (24)
-
collect
_ concat (12) - combination (24)
- compact (4)
-
compare
_ by _ identity (12) -
compare
_ by _ identity? (12) - concat (42)
- conj (12)
- conjugate (12)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ source _ location (12) - constants (12)
- convert (12)
- convpath (12)
- count (84)
- cover? (19)
- crypt (12)
- curry (46)
- cycle (48)
- deconstruct (11)
-
deconstruct
_ keys (13) - dedup (3)
-
default
_ proc (12) -
default
_ proc= (12) -
defined
_ class (12) - delete (36)
- delete! (12)
-
delete
_ at (12) -
delete
_ if (36) -
delete
_ prefix (8) -
delete
_ prefix! (8) -
delete
_ suffix (8) -
delete
_ suffix! (8) - denominator (48)
-
deprecate
_ constant (12) - deq (20)
-
destination
_ encoding (12) - detect (24)
- difference (10)
- dig (20)
- digits (24)
- directory? (12)
- disable (24)
- disasm (12)
- disassemble (12)
- div (24)
- divmod (24)
- downcase (12)
- downcase! (12)
- downto (24)
- drop (36)
-
drop
_ while (36) - dump (8)
- each (201)
-
each
_ byte (36) -
each
_ char (48) -
each
_ child (14) -
each
_ codepoint (24) -
each
_ cons (24) -
each
_ entry (24) -
each
_ grapheme _ cluster (16) -
each
_ index (24) -
each
_ key (12) -
each
_ line (93) -
each
_ pair (24) -
each
_ slice (24) -
each
_ value (12) -
each
_ with _ index (24) -
each
_ with _ object (24) - enable (24)
- encode (36)
- encode! (24)
- encoding (12)
- end (24)
-
end
_ with? (12) - entries (19)
-
enum
_ for (24) - eof (12)
- eof? (12)
- eql? (159)
- equal? (36)
-
error
_ bytes (12) - eval (12)
-
eval
_ script (7) - event (12)
- exception (12)
- fcntl (12)
- fdiv (36)
- feed (12)
- fetch (44)
-
fetch
_ values (2) - fileno (23)
- fill (72)
- filter (63)
- filter! (28)
-
filter
_ map (18) - find (24)
-
find
_ all (36) -
find
_ index (72) - finish (12)
- finite? (9)
- first (72)
-
flat
_ map (12) - flatten (24)
- flatten! (12)
- flock (12)
- floor (54)
-
force
_ encoding (12) - freeze (24)
- frozen? (12)
-
garbage
_ collect (12) - gcd (12)
- gcdlcm (12)
- getbyte (24)
- getc (12)
- gets (36)
-
grapheme
_ clusters (16) - grep (36)
-
grep
_ v (34) - gsub (48)
- gsub! (48)
- hash (27)
- hex (12)
-
ignore
_ deadlock= (4) - imag (24)
- imaginary (24)
- include? (48)
- included (12)
- index (48)
- infinite? (9)
- inherited (12)
- initialize (12)
- inject (36)
-
inplace
_ mode (12) -
inplace
_ mode= (12) - insert (24)
-
insert
_ output (12) - inspect (151)
-
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)
-
internal
_ encoding (12) - intersection (9)
- invert (12)
- join (12)
-
keep
_ if (43) - key? (12)
- label (24)
- last (48)
- lazy (12)
- lcm (12)
- length (12)
- lineno (12)
- lines (24)
- ljust (12)
-
local
_ variable _ defined? (12) -
local
_ variable _ get (12) -
local
_ variable _ set (12) - lstrip (12)
- magnitude (12)
- map (60)
- map! (24)
-
marshal
_ dump (12) -
marshal
_ load (24) - match (48)
- match? (27)
- max (130)
- max= (10)
-
max
_ by (48) - member? (39)
- merge (27)
- merge! (24)
-
method
_ defined? (12) -
method
_ id (12) -
method
_ missing (12) -
method
_ removed (12) - methods (12)
- min (130)
-
min
_ by (48) - minmax (36)
-
minmax
_ by (24) -
module
_ eval (12) -
module
_ exec (12) -
module
_ function (24) - modulo (36)
- name (17)
- name= (10)
-
named
_ captures (12) - negative? (19)
- new (12)
- next (24)
- next! (12)
-
next
_ values (12) - nobits? (8)
- none? (45)
- nonzero? (12)
- numerator (48)
-
object
_ id (12) - oct (12)
- offset (24)
- one? (45)
- ord (24)
-
original
_ name (24) - overlap? (2)
- pack (21)
- parameters (31)
- partition (12)
- path (44)
- peek (12)
-
peek
_ values (12) - permutation (24)
- phase (12)
- pid (12)
- polar (24)
- pop (44)
- pos (24)
- pos= (12)
- positive? (19)
-
post
_ match (12) - pow (24)
-
pre
_ match (12) - pread (8)
- pred (12)
- prepend (41)
-
prepend
_ features (12) - prepended (12)
-
prev
_ float (11) -
primitive
_ convert (48) -
primitive
_ errinfo (12) - print (12)
- priority (12)
- priority= (12)
- private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ instance _ methods (12) -
private
_ method _ defined? (12) - product (24)
-
proper
_ subset? (3) -
proper
_ superset? (3) -
protected
_ method _ defined? (12) - public (36)
-
public
_ method _ defined? (12) -
public
_ send (24) - push (12)
- putback (24)
- pwrite (8)
- quo (36)
- raise (18)
-
raised
_ exception (12) - rand (36)
- rassoc (24)
- rationalize (108)
- read (24)
- readbyte (24)
- readchar (12)
- readlines (36)
- real (12)
- real? (24)
- receiver (6)
- rect (24)
- rectangular (24)
- reduce (36)
- refine (12)
- rehash (12)
- reject (84)
- reject! (51)
- remainder (24)
-
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ instance _ variable (12) -
remove
_ method (12) - reopen (36)
-
repeated
_ combination (24) -
repeated
_ permutation (24) - replace (27)
- replacement (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 (28) - rewind (24)
- rindex (48)
- rjust (12)
- rotate (12)
- rotate! (12)
- round (69)
- rpartition (12)
- rstrip (12)
- rstrip! (12)
- run (12)
- sample (48)
- scan (24)
- scrub (36)
- scrub! (36)
- seek (12)
- select (103)
- select! (43)
- self (12)
- send (24)
-
set
_ backtrace (12) -
set
_ trace _ func (12) - setbyte (12)
- shift (44)
- shuffle (24)
- shuffle! (24)
- signal (10)
-
singleton
_ method _ removed (12) -
singleton
_ methods (12) - size (49)
- sleep (12)
- slice (108)
- slice! (36)
-
slice
_ after (46) -
slice
_ before (60) -
slice
_ when (23) - sort (48)
- sort! (24)
-
sort
_ by (24) -
sort
_ by! (24) -
source
_ encoding (12) -
source
_ location (36) - split (19)
- squeeze (12)
- squeeze! (12)
-
start
_ with? (18) - step (124)
- stop? (12)
- store (12)
- strftime (12)
- strip (12)
- strip! (12)
- sub (36)
- sub! (36)
- subset? (3)
- subtract (3)
- succ (12)
- succ! (12)
- sum (54)
-
super
_ method (11) - superclass (4)
- superset? (3)
- swapcase (12)
- swapcase! (12)
- synchronize (12)
- syswrite (12)
- take (36)
-
take
_ while (72) - tally (8)
- tell (24)
- then (7)
-
thread
_ variable _ set (12) - times (24)
-
to
_ a (73) -
to
_ ary (24) -
to
_ binary (10) -
to
_ c (12) -
to
_ enum (24) -
to
_ f (24) -
to
_ h (19) -
to
_ i (60) -
to
_ int (12) -
to
_ path (8) -
to
_ proc (12) -
to
_ r (36) -
to
_ s (120) -
to
_ set (6) -
to
_ str (12) - tr (12)
-
tr
_ s (12) -
tr
_ s! (12) - transfer (4)
-
transform
_ keys (20) -
transform
_ keys! (20) -
transform
_ values (18) -
transform
_ values! (18) - truncate (60)
- trust (9)
- undump (8)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - union (7)
- uniq (24)
- unpack (12)
- unpack1 (9)
- unshift (12)
- untrust (9)
- untrusted? (9)
- upcase (12)
- upcase! (12)
- update (24)
- upto (36)
- values (6)
-
values
_ at (36) - wakeup (12)
- with (3)
-
with
_ index (12) -
with
_ object (24) - write (12)
- yield (12)
-
yield
_ self (8) - zero? (12)
- zip (72)
- | (60)
検索結果
先頭5件
-
Module
# prepend _ features(mod) -> self (12227.0) -
Module#prepend から呼び出されるメソッドで、 prepend の処理の実体です。このメソッド自体は mod で指定した モジュール/クラスの継承チェインの先頭に self を追加します。
...Module#prepend から呼び出されるメソッドで、
prepend の処理の実体です。このメソッド自体は mod で指定した
モジュール/クラスの継承チェインの先頭に self を追加します。
このメソッドを上書きすることで、prepend の処理を変......す。
@param mod prepend を呼び出したモジュール
@return mod が返されます
//emlist[例][ruby]{
class Recorder
RECORDS = []
end
module X
def self.prepend_features(mod)
Recorder::RECORDS << mod
end
end
class A
prepend X
end
class B
include X
end
class C
prepend X......end
Recorder::RECORDS # => [A, C]
//}
@see Module#prepend, Module#prepended... -
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (12127.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
...て返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data メソッ......ry で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキテクチャのRubyで作られたバイナリデータは使用できません。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.to_binary("extr......合上改行しているが実際は改行はない
# => "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\x00\x00\x01
# \x00\x00\x00\x00\x0... -
Random
# rand(range) -> Integer | Float (9239.0) -
一様な擬似乱数を発生させます。
...ることは出来ません。
三番目の形式では range で指定された範囲の値を返します。
range の始端と終端が共に整数の場合は整数を、少なくとも片方が実数の場合は実数を返します。
rangeが終端を含まない(つまり ... で生成し......れます。
range.end - range.begin が整数を返す場合は range.begin + self.rand((range.end - range.begin) + e)
の値を返します(e は終端を含む場合は1、含まない場合は0です)。
range.end - range.begin が実数を返す場合も同様です。
このため range が Ti......います。
@param max 乱数値の上限を正の整数または実数で指定します。
max 自体は乱数値の範囲に含まれません。
@param range 発生させる乱数値の範囲を Range オブジェクトで指定します。
range.end - range.begin... -
Rational
# rationalize(eps = 0) -> Rational (9239.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
# strip -> String (9237.0) -
文字列先頭と末尾の空白文字を全て取り除いた文字列を生成して返します。 空白文字の定義は " \t\r\n\f\v\0" です。
...義は " \t\r\n\f\v\0" です。
//emlist[例][ruby]{
p " abc \r\n".strip #=> "abc"
p "abc\n".strip #=> "abc"
p " abc".strip #=> "abc"
p "abc".strip #=> "abc"
p " \0 abc \0".strip #=> "abc"
str = "\tabc\n"
p str.strip #=> "abc"
p str......#=> "\tabc\n" (元の文字列は変化しない)
//}
@see String#lstrip, String#rstrip... -
String
# lstrip -> String (9231.0) -
文字列の先頭にある空白文字を全て取り除いた新しい文字列を返します。 空白文字の定義は " \t\r\n\f\v\0" です。
...にある空白文字を全て取り除いた新しい文字列を返します。
空白文字の定義は " \t\r\n\f\v\0" です。
//emlist[例][ruby]{
p " abc\n".lstrip #=> "abc\n"
p "\t abc\n".lstrip #=> "abc\n"
p "abc\n".lstrip #=> "abc\n"
//}
@see String#strip, String#rstrip... -
Encoding
:: Converter # primitive _ errinfo -> Array (9221.0) -
直前の Encoding::Converter#primitive_convert による変換の結果を保持する五要素の配列を返します。
...直前の Encoding::Converter#primitive_convert による変換の結果を保持する五要素の配列を返します。
@return [result, enc1, enc2, error_bytes, readagain_bytes] という五要素の配列
result は直前の primitive_convert の戻り値です。
それ以外の四要素は......t か :undefined_conversion だった場合に意味を持ちます。
enc1 はエラーの発生した原始変換の変換元のエンコーディング、enc2 は変換先のエンコーディングです。
error_bytes はエラーの発生原因となったバイト列、readagain_bytes は先......列です。
primitive_errinfo はもっぱら Encoding::Converter#primitive_convert と組み合わせて使います。Encoding::Converter#convert を用いている場合にも取得することはできますが、有用な使い方は難しいでしょう。
//emlist[][ruby]{
# \xff is invali... -
Rational
# -@ -> Rational (9221.0) -
単項演算子の - です。 self の符号を反転させたものを返します。
...単項演算子の - です。
self の符号を反転させたものを返します。
//emlist[例][ruby]{
r = Rational(3, 4)
- r # => (-3/4)
//}... -
String
# +@ -> String | self (9215.0) -
self が freeze されている文字列の場合、元の文字列の複製を返します。 freeze されていない場合は self を返します。
...self が freeze されている文字列の場合、元の文字列の複製を返します。
freeze されていない場合は self を返します。
//emlist[例][ruby]{
# frozen_string_literal: false
original_text = "text"
unfrozen_text = +original_text
unfrozen_text.frozen?......=> false
original_text == unfrozen_text # => true
original_text.equal?(unfrozen_text) # => true
original_text = "text".freeze
unfrozen_text = +original_text
unfrozen_text.frozen? # => false
original_text == unfrozen_text # => true
original_text.equal?(unfrozen_text)......# => false
//}
@see String#-@...