Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save francescoagati/357398 to your computer and use it in GitHub Desktop.
Save francescoagati/357398 to your computer and use it in GitHub Desktop.
require 'Tempfile'
class Test
def `(s)
output=""
Tempfile.open("w") do |f|
system "#{s} > #{f.path}"
output=f.readlines.to_s
end
output
end
def shell(command)
end
end
Test.instance_eval do
p `ls /`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment