On Sep 1, 2007, at 5:41 AM, Phil wrote:

>> Hello. I'm new to Ruby (and also to scripting languages).
>>
>> I'd like to know if, since Ruby is a scripting language, there's a  
>> way
>> to hide the code when deploying an application. I'd users to be  
>> unable
>> to see the source.
>>
>> Is there a solution for that?
>
> http://www.rubyinside.com/px-a-quick-and-silly-ruby-obfuscation- 
> system-7.html
>
> If you want to obfuscate code for business reasons, though, you  
> might want to use a different language (Perl is naturally  
> obfuscated :P), where obfuscators are available on a larger scale  
> (Java and .NET languages should offer that, with them being  
> enterprise-y and all).
>
> The question is: Why do you need that? If you license your  
> software, you could include a section on using the source in other  
> applications a big, big no-no (well, you'd reiterate copyright  
> laws, basically), and that your code is a trade secret. IANAL,  
> though, nor do I play one on TV, so take that with a grain of salt.
>
> --
> Phillip Gawlowski
>
>
If you really think you need to obfuscate your code, then you're  
doing something wrong. It is always possible to decompile stuff even  
with compiled languages. PHP users often use obfuscation to try and  
hide stuff.
Consider crafty use of file permissions settings, and simply burying  
things in modules with hard to read names.
But ultimately, simply put pen to paper and make somebody sign a  
contract if you have to. You could go to great lengths, but if it's  
really worth it, you'll just use lawyers.