ライブラリ
- ビルトイン (9671)
クラス
-
ARGF
. class (394) - Array (1608)
- BasicObject (36)
- Bignum (57)
- Binding (11)
- Class (12)
- Complex (15)
- Data (6)
- Dir (164)
-
Encoding
:: Converter (12) - Enumerator (108)
-
Enumerator
:: ArithmeticSequence (62) -
Enumerator
:: Chain (21) -
Enumerator
:: Lazy (353) -
Enumerator
:: Yielder (30) - Exception (36)
- FalseClass (12)
- Fiber (4)
- File (120)
-
File
:: Stat (120) - Fixnum (54)
- Float (117)
- Hash (651)
- IO (724)
- Integer (136)
- LoadError (12)
- MatchData (102)
- Method (35)
- Module (396)
- NilClass (12)
- Numeric (190)
- Object (126)
-
ObjectSpace
:: WeakMap (12) - Proc (122)
-
Process
:: Status (36) - Random (36)
- Range (213)
- Rational (144)
- Regexp (84)
-
RubyVM
:: InstructionSequence (12) - Set (57)
- String (1072)
- Struct (110)
- Symbol (189)
- SystemCallError (12)
- Thread (140)
-
Thread
:: Backtrace :: Location (48) -
Thread
:: Queue (70) -
Thread
:: SizedQueue (40) - Time (24)
- TracePoint (141)
- TrueClass (12)
- UnboundMethod (35)
モジュール
- Enumerable (1326)
キーワード
- % (20)
- & (6)
- * (18)
- ** (18)
- + (18)
- +@ (10)
- - (18)
- -@ (10)
-
/ (18) - < (12)
- << (28)
- <= (12)
- <=> (141)
- == (24)
- === (12)
- =~ (36)
- > (12)
- >= (12)
- >> (13)
- [] (288)
- ^ (6)
- abs (6)
-
absolute
_ path (24) - add (3)
- add? (3)
-
add
_ trace _ func (12) - advise (12)
- all? (53)
- angle (24)
- any? (62)
-
append
_ features (12) - arg (24)
- arity (12)
- assoc (24)
- at (12)
- atime (12)
- autoclose? (12)
- autoload? (12)
- backtrace (12)
-
backtrace
_ locations (24) -
base
_ label (12) - begin (18)
- binding (12)
- binmode (12)
- blockdev? (12)
- bsearch (48)
-
bsearch
_ index (20) - byteindex (3)
- byteoffset (6)
- byterindex (3)
- bytes (52)
- byteslice (36)
- call (12)
-
callee
_ id (12) - capitalize! (12)
- casecmp (24)
- casecmp? (18)
- cause (12)
- ceil (25)
- chardev? (12)
- chars (52)
- children (7)
- chomp! (12)
- chop! (12)
- chown (12)
- chr (12)
- chunk (36)
-
chunk
_ while (21) -
class
_ eval (24) -
class
_ exec (12) - classify (3)
- clear (10)
- clone (12)
- close (10)
-
close
_ read (12) -
close
_ write (12) - closed? (10)
- codepoints (52)
- collect (60)
- collect! (27)
-
collect
_ concat (36) - combination (24)
- compact (21)
- compact! (21)
- count (72)
- ctime (12)
- curry (24)
- cycle (48)
- dedup (3)
- default (24)
-
default
_ proc (12) -
default
_ proc= (12) -
defined
_ class (12) - delete (51)
- delete! (12)
- delete? (3)
-
delete
_ at (12) -
delete
_ if (51) -
delete
_ prefix! (8) -
delete
_ suffix! (8) - deq (20)
- detect (24)
- dig (30)
- div (6)
- divide (6)
- downcase! (12)
- downto (24)
-
drop
_ while (60) - dup (12)
- each (319)
-
each
_ byte (72) -
each
_ char (72) -
each
_ child (14) -
each
_ codepoint (72) -
each
_ cons (24) -
each
_ entry (24) -
each
_ grapheme _ cluster (16) -
each
_ index (24) -
each
_ key (24) -
each
_ line (144) -
each
_ pair (48) -
each
_ slice (24) -
each
_ value (24) -
each
_ with _ index (24) -
each
_ with _ object (24) - eager (6)
- encode (36)
- end (19)
-
enum
_ for (48) - eof (12)
- eof? (12)
- errno (12)
-
eval
_ script (7) - event (12)
- exitstatus (12)
-
extend
_ object (12) -
external
_ encoding (12) - fcntl (12)
- fdatasync (12)
- fdiv (18)
- fetch (80)
-
fetch
_ values (20) - fileno (11)
- fill (72)
- filter (63)
- filter! (31)
-
filter
_ map (18) - find (24)
-
find
_ all (36) -
find
_ index (72) - first (62)
-
flat
_ map (36) - flatten (15)
- flatten! (15)
- flock (12)
- floor (26)
- flush (12)
- getbyte (36)
- getc (24)
- gets (72)
-
grapheme
_ clusters (16) - grep (36)
-
grep
_ v (34) -
group
_ by (24) - gsub (48)
- gsub! (48)
- index (48)
- infinite? (21)
- inject (36)
-
inplace
_ mode (12) -
inplace
_ mode= (12) - inspect (48)
-
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ method (12) -
instance
_ variable _ get (12) -
instruction
_ sequence (7) -
internal
_ encoding (24) - invert (12)
- join (24)
-
keep
_ if (51) - lambda? (12)
- last (38)
-
last
_ error (12) - lazy (12)
- length (10)
- lineno (12)
- lines (108)
-
local
_ variables (11) - lstat (12)
- lstrip! (12)
- magnitude (6)
- map (60)
- map! (27)
- match (60)
- max (130)
-
max
_ by (48) - merge (24)
- merge! (24)
-
method
_ id (12) - min (130)
-
min
_ by (48) - minmax (48)
-
minmax
_ by (24) -
module
_ eval (24) -
module
_ exec (12) -
module
_ function (36) - modulo (6)
- mtime (12)
- name (12)
- none? (53)
- nonzero? (12)
- offset (24)
- one? (53)
- owner (24)
- pack (21)
- parameters (7)
- partition (24)
- path (51)
- permutation (24)
- phase (24)
- pid (12)
- pop (44)
- pos (24)
- pos= (24)
- pread (8)
- private (48)
- product (24)
- protected (48)
- public (48)
- pwrite (8)
- quo (24)
-
raised
_ exception (12) - rand (36)
- rassoc (24)
- read (36)
-
read
_ nonblock (22) - readbyte (12)
- readlines (36)
- reduce (36)
- reject (84)
- reject! (51)
- remainder (15)
-
repeated
_ combination (24) -
repeated
_ permutation (24) -
respond
_ to? (12) -
return
_ value (12) -
reverse
_ each (52) - rewind (12)
- rindex (48)
- round (37)
- rstrip! (12)
- sample (48)
- scan (24)
- scrub (36)
- scrub! (36)
- seek (12)
- select (108)
- select! (51)
-
set
_ backtrace (12) -
set
_ encoding _ by _ bom (6) -
set
_ trace _ func (12) - setgid? (12)
- setuid? (12)
- shift (56)
- size (60)
- size? (12)
- slice (168)
- slice! (36)
-
slice
_ after (46) -
slice
_ before (60) -
slice
_ when (23) - socket? (12)
- sort (48)
- sort! (24)
-
sort
_ by (24) -
sort
_ by! (24) - source (12)
-
source
_ location (36) - split (14)
- squeeze! (12)
- stat (12)
- status (12)
- step (124)
- sticky? (12)
- stopsig (12)
- strip! (12)
- sub (36)
- sub! (36)
- subsec (12)
- succ (3)
- sum (54)
-
super
_ method (22) - superclass (12)
- swapcase! (12)
- sync (12)
- sysseek (12)
- syswrite (12)
-
take
_ while (72) - tap (12)
- tell (24)
- termsig (12)
- then (14)
-
thread
_ variable _ get (12) - times (24)
-
to
_ enum (48) -
to
_ h (67) -
to
_ i (21) -
to
_ path (27) -
to
_ proc (6) -
to
_ s (36) -
to
_ set (6) - tr! (12)
-
tr
_ s! (12) - transfer (4)
-
transform
_ keys (20) -
transform
_ keys! (20) -
transform
_ values (18) -
transform
_ values! (18) - truncate (37)
- uniq (66)
- uniq! (24)
- unpack (12)
- upcase! (12)
- update (24)
- upto (36)
- value (12)
-
with
_ index (36) -
with
_ object (24) -
world
_ readable? (12) -
world
_ writable? (12) - write (12)
-
write
_ nonblock (12) - yield (24)
-
yield
_ self (16) - zip (60)
- ~ (18)
検索結果
先頭5件
-
FalseClass
# |(other) -> bool (26143.0) -
other が真なら true を, 偽なら false を返します。
...
| は再定義可能な演算子に分類されていますので、通常は false | other の形で使われます。
//emlist[例][ruby]{
p false | true #=> true
p false | false #=> false
p false | nil #=> false
p false | (1 == 1) #=> true
p false | (1 + 1) #=> true
p false.|(tru......e) #=> true
p false.|(false) #=> false
p false.|(nil) #=> false
p false.|(1 == 1) #=> true
p false.|(1 + 1) #=> true
//}... -
TrueClass
# |(other) -> bool (26143.0) -
常に true を返します。
...。
| は再定義可能な演算子に分類されていますので、通常は true | other のように使われます。
//emlist[例][ruby]{
p true | true #=> true
p true | false #=> true
p true | nil #=> true
p true | (1 == 1) #=> true
p true | (1 + 1) #=> true
p true.|(true)......#=> true
p true.|(false) #=> true
p true.|(nil) #=> true
p true.|(1 == 1) #=> true
p true.|(1 + 1) #=> true
//}... -
NilClass
# |(other) -> bool (26125.0) -
other が真なら true を, 偽なら false を返します。
...other が真なら true を, 偽なら false を返します。
@param other 論理和を行なう式です
//emlist[例][ruby]{
nil | true # => true
nil | false # => false
nil | nil # => false
nil | "a" # => true
//}... -
Bignum
# |(other) -> Fixnum | Bignum (26114.0) -
ビット二項演算子。論理和を計算します。
...ビット二項演算子。論理和を計算します。
@param other 数値
1 | 1 #=> 1
2 | 3 #=> 3... -
Fixnum
# |(other) -> Fixnum | Bignum (26114.0) -
ビット二項演算子。論理和を計算します。
...ビット二項演算子。論理和を計算します。
@param other 数値
1 | 1 #=> 1
2 | 3 #=> 3... -
Integer
# |(other) -> Integer (26113.0) -
ビット二項演算子。論理和を計算します。
...ビット二項演算子。論理和を計算します。
@param other 数値
//emlist[][ruby]{
1 | 1 # => 1
2 | 3 # => 3
//}... -
Array
# |(other) -> Array (26107.0) -
集合の和演算です。両方の配列にいずれかに含まれる要素を全て含む新し い配列を返します。重複する要素は取り除かれます。
...る暗黙の型変換を試みます。
@raise TypeError 引数に配列以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
[1, 1, 4, 2, 3] | [5, 4, 5] #=> [1, 4, 2, 3, 5]
//}
@see Array#&......暗黙の型変換を試みます。
@raise TypeError 引数に配列以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
[1, 1, 4, 2, 3] | [5, 4, 5] #=> [1, 4, 2, 3, 5]
//}
@see Array#&
@see Array#union... -
Set
# |(enum) -> Set (23101.0) -
和集合、すなわち、2 つの集合の少なくともどちらか一方に属するすべての 要素からなる新しい集合を作ります。
和集合、すなわち、2 つの集合の少なくともどちらか一方に属するすべての
要素からなる新しい集合を作ります。
@param enum each メソッドが定義されたオブジェクトを指定します。
@raise ArgumentError 引数 enum に each メソッドが定義されていない場合に
発生します。
//emlist[][ruby]{
p Set[10, 20, 30] + Set[10, 20, 40]
# => #<Set: {10, 20, 30, 40}>
//} -
Array
# <=>(other) -> -1 | 0 | 1 | nil (8304.0) -
自身と other の各要素をそれぞれ順に <=> で比較していき、結果が 0 でなかった場合に その値を返します。各要素が等しく、配列の長さも等しい場合には 0 を返します。 各要素が等しいまま一方だけ配列の末尾に達した時、自身の方が短ければ -1 をそうでなければ 1 を返します。 other に配列以外のオブジェクトを指定した場合は nil を返します。
自身と other の各要素をそれぞれ順に <=> で比較していき、結果が 0 でなかった場合に
その値を返します。各要素が等しく、配列の長さも等しい場合には 0 を返します。
各要素が等しいまま一方だけ配列の末尾に達した時、自身の方が短ければ -1 をそうでなければ 1
を返します。
other に配列以外のオブジェクトを指定した場合は nil を返します。
@param other 自身と比較したい配列を指定します。
配列以外のオブジェクトを指定した場合は to_ary メソッドによ
る暗黙の型変換を試みます。
//emlist[... -
Complex
# <=>(other) -> -1 | 0 | 1 | nil (8304.0) -
self の虚部がゼロで other が実数の場合、 self の実部の <=> メソッドで other と比較した結果を返します。 other が Complex で虚部がゼロの場合も同様です。
self の虚部がゼロで other が実数の場合、
self の実部の <=> メソッドで other と比較した結果を返します。
other が Complex で虚部がゼロの場合も同様です。
その他の場合は nil を返します。
@param other 自身と比較する数値
//emlist[例][ruby]{
Complex(2, 3) <=> Complex(2, 3) #=> nil
Complex(2, 3) <=> 1 #=> nil
Complex(2) <=> 1 #=> 1
Complex(2) ... -
Float
# <=>(other) -> -1 | 0 | 1 | nil (8304.0) -
self と other を比較して、self が大きい時に正、 等しい時に 0、小さい時に負の整数を返します。 比較できない場合はnilを返します
self と other を比較して、self が大きい時に正、
等しい時に 0、小さい時に負の整数を返します。
比較できない場合はnilを返します
//emlist[例][ruby]{
3.05 <=> 3.14 # => -1
1.732 <=> 1.414 # => 1
3.3 - 3.3 <=> 0.0 # => 0
3.14 <=> "hoge" # => nil
3.14 <=> 0.0/0.0 # => nil
//} -
Integer
# <=>(other) -> -1 | 0 | 1 | nil (8304.0) -
self と other を比較して、self が大きい時に1、等しい時に 0、小さい時 に-1、比較できない時に nil を返します。
self と other を比較して、self が大きい時に1、等しい時に 0、小さい時
に-1、比較できない時に nil を返します。
@param other 比較対象の数値
@return -1 か 0 か 1 か nil のいずれか
//emlist[][ruby]{
1 <=> 2 # => -1
1 <=> 1 # => 0
2 <=> 1 # => 1
2 <=> '' # => nil
//}