autovivification in Ruby?

Posted by root Sun, 13 Apr 2008 21:41:00 GMT

if false
 x = true
end

x.class #NilClass

Ruby declares the variable even if the assignment is not executed.

Posted in  | Tags  | no comments

sudo with Ruby

Posted by root Sun, 13 Apr 2008 16:13:00 GMT

Process::Sys.setreuid(0,0) || system("su")

Posted in  | Tags  | no comments