RosettaCodeData/Task/Empty-string/Ruby/empty-string-2.rb

9 lines
102 B
Ruby

s == ""
s.eql?("")
s.empty?
s.length == 0
s[/\A\z/]
# also silly things like
s.each_char.to_a.empty?