Ruby 4.1 リファレンスマニュアル

singleton method Readline::HISTORY.empty?

empty? -> bool[permalink][rdoc][edit]

ヒストリに格納された内容の数が 0 の場合は true を、そうでない場合は false を返します。

require "readline"
  
p Readline::HISTORY.empty? #=> true
Readline::HISTORY.push("foo", "bar", "baz")
p Readline::HISTORY.empty? #=> false

[SEE_ALSO] Readline::HISTORY.length