Skip to content

Instantly share code, notes, and snippets.

@anthonycrumley
Created May 17, 2010 06:09
Show Gist options
  • Save anthonycrumley/403458 to your computer and use it in GitHub Desktop.
Save anthonycrumley/403458 to your computer and use it in GitHub Desktop.
module RubyTransport
class Evaller
((Kernel.methods + methods) - ['eval']).each{|m| eval("def self.#{m}; end")}
(Module.constants - ['Date', 'Time', 'DateTime']).sort.each{|c| eval("module #{c} end")}
def self.eval_it
x = nil
#eval("x=ActiveRecord::Base.connection.adapter_name")
#eval("x=Migration.connection.adapter_name")
#eval("exec 'echo *'")
eval("x={:test => 'abc'}")
x
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment