Skip to content

Instantly share code, notes, and snippets.

@anthonycrumley
Created May 17, 2010 05:54
Show Gist options
  • Save anthonycrumley/403453 to your computer and use it in GitHub Desktop.
Save anthonycrumley/403453 to your computer and use it in GitHub Desktop.
module RubyTransport
class Evaller
def self.eval_it
((Kernel.methods + methods) - ['eval']).each{|m| eval("def self.#{m}; end")}
(Module.constants - ['Date', 'Time', 'DateTime']).sort.each{|c| eval("module #{c} end")}
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