Lothar Scholz <mailinglists / scriptolutions.com> writes:

> Hello Shashank,
>
>>> At the moment it is simply not possible (in an easy way and with the
>>> current ruby license).
>
> SD> What has the license to do with it ?
>
> I'm not very good in reading license texts so i might be wrong here.
>
> It is possible to do a really good encrpytion (locking out 99,9% of all hackers)
> of your program if you could modify the ruby.exe file without being forced to
> publish your changes. But the current license does not allow this.

IANAL, but I can't see why (citing LICENSE.txt):

  2. You may modify your copy of the software in any way, provided that
     you do at least ONE of the following:
     ...
       c) rename any non-standard executables so the names do not conflict
	  with standard executables, which must also be provided.

  3. You may distribute the software in object code or executable
     form, provided that you do at least ONE of the following:
     ...
       c) give non-standard executables non-standard names, with
          instructions on where to get the original software distribution.

So, calling your "secure" Ruby `secruby' and including an ordinary
ruby too, this should not be an issue, AFAICT.

  4. You may modify and include the part of the software into any other
     software (possibly commercial).  But some files in the distribution
     are not written by the author, so that they are not under this terms.

This can be worked around by not modifiying the addressed files or
opening the changes to them (the Regexp engine is not a security risk,
for example).  You could possibly have to include their source, which
is not a problem in practice.

> I don't want to discuss the way how to do the protection in a public
> newsgroup.

http://en.wikipedia.org/wiki/Security_through_obscurity

The only proper way to make Ruby code currently runnable but not
readable is IMO dumping the eval tree and reloading it at startup.
This is technically possible, but I wont help any efforts to do this.


Christian Neukirchen
<chneukirchen / gmail.com>