るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.169秒)

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. dbm to_a
  5. argf.class to_a

ライブラリ

検索結果

TrueClass#|(other) -> bool (63433.0)

常に true を返します。

常に true を返します。

@param other 論理和を行なう式です。

| は再定義可能な演算子に分類されていますので、通常は 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) #=> ...