unless defined? var1 var1 = "Not empty"end puts "var1: #{var1.inspect}" var2 = "Not empty" unless defined? var2 puts "var2: #{var2.inspect}"
Standard input is empty
var1: "Not empty" var2: nil
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!