From: Kris Date: 2006-05-22T00:29:24+09:00 Subject: Re: Writing a interpreter extension Thanks for the reply. The problem with doing it in Ruby is that there is no where to hide the decryption key... It would be in plain text, unless I'm am missing something? Logan Capaldo wrote: > On May 19, 2006, at 2:59 PM, Eric Hodel wrote: > >>>>> line by >> Eric Hodel - drbrain@segment7.net - http://blog.segment7.net >> This implementation is HODEL-HASH-9600 compliant >> >> http://trackmap.robotcoop.com >> >> >> > > For example: > > > module Kernel > alias old_require require > > def require(file) > # first check if it's already been required by searching > $LOADED_FEATURES > # Search $LOAD_PATH for the file > if it's an .rb file then > File.open(full_path_and_filename) do |f| > # Preprocess f and if neccessary do any changes and eval them > end > # add the file to $LOADED_FEATURES > else > old_require(file) > end > end > end -- Posted via http://www.ruby-forum.com/.