IceDragon200

HAX

Aug 5th, 2011
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.40 KB | None | 0 0
  1. class DumpableProc
  2.  
  3.   def initialize( con_string )
  4.     @code = con_string
  5.     @__block = eval("Proc.new { |*args| #{@code} }")
  6.   end
  7.   def call( *args ) ; @__block.call( *args ) ; end
  8.   def _dump( n ) ; @code ; end
  9.   def self._load( con_string ) ; new( con_string ) ; end
  10.  
  11. end
  12.  
  13. pro = DumpableProc.new %q(
  14.   puts "Hello World"
  15. )
  16.  
  17. pro.call()
  18. pro = Marshal.load( Marshal.dump( pro ) )
  19. pro.call
Advertisement
Add Comment
Please, Sign In to add comment