From: Guido De Rosa Date: 2010-10-19T01:32:13+09:00 Subject: su {block of code.} Hi! Scenario: on a Unix-like system I run a ruby program under a non-privileged user. Occasionally I need to gain root privileges. For external commands it's just a matter of installing sudo, editing /etc/sudoers properly, and going: system "sudo command..." But what if I want to do the same for a block of code? Something like this would be really, really cool: include Sudo su do # ruby code... end There's a way to get this? A gem? Any idea on how to implement it? Thanks, Guido -- Posted via http://www.ruby-forum.com/.