z= if 3==4 then 1 else 2 end
puts z # →2
こんなことが出来るのを知った

いままでいちいち
if 3==4 then x=1 else x=2 end
puts x # →2
などとやっていた