sudo gem install packr
This release improves compression of local variable names, and adds a couple new features. Firstly, it allows you to compress private variables (denoted by a leading underscore), meaning you can clearly indicate that private methods should not be called as they will have unpredictable numeric names once packed:
Packr.pack("foo._someMethod();", :private => true) # => "foo._1()"
Secondly, it allows you to protect certain variables from compression. For
example, Prototype uses the magic
$super variable to implement inheritance, so
your code will break if that variable is renamed. You can prevent this by
telling PackR to ignore it:
Packr.pack(code, :shrink_vars => true, :protect => ['$super'])
Finally, note that PackR is now a gem and not a Rails plugin. Obviously this means you can still use it in Rails, you just need to install it differently.
Give it a spin and let me know how it goes. Any bugs should be reported to me at Github.