るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.027秒)
トップページ > ライブラリ:ビルトイン[x] > クエリ:Class[x] > クエリ:==[x] > クエリ:|[x] > バージョン:2.7.0[x] > クラス:FalseClass[x]

別のキーワード

  1. argf.class lines
  2. argf.class each
  3. argf.class each_line
  4. class new
  5. argf.class gets

検索結果

FalseClass#|(other) -> bool (63472.0)

other が真なら true を, 偽なら false を返します。

other が真なら true を, 偽なら false を返します。

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

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