I would like to present the free (2-clause BSD license) gem for source
code protection written in Ruby MRI named node-marshal:
It irreversibly transforms Ruby source code into ternary abstract syntax
tree (AST) and allows to save such AST to file and load it. Ruby MRI
internal structures and C extension are actively used inside the gem.
Ruby 1.9.3 and Ruby 2.2.x (MRI) are supported. The similar idea is used
in RubyEncoder. Identifiers names (classes, variables, symbols) are
remaining intact because of metaprogramming issues.
Another solutions found by me in Internet are either commercial
(RubyEncoder) or have apparent bugs:
I’ll greatly appreciate any feedback or bugreports.