[Yarv-devel] Prevent operations in yarv
Aureliano Calvo
aurelianocalvo at yahoo.com.ar
Tue Oct 18 18:09:11 EDT 2005
Hi all,
I'm trying to implement a security manager for ruby
like the java security manager. In order to achieve
it, I need to be able to selectively prevent some
things to ocurr:
* Method definition
* Method undefinition
* Method redefinition
* Constant definition
* Constant modification
* Constant undefinition
* Module/Class definition
* Module/Class modification
* Module/Class undefinition
I've tried to implement a "pure ruby" solution, but
I've found that it's impossible to prevent the
definition, redefinition and undefinition of a
constant and it's very very tricky to prevent the
other operations (for instance method redefinition can
be prevented by aliasing every method and overloading
the method_added method to go back to the original
implementation).
What would be nice is for ruby to have built in
something like the feature described in
http://www.rubygarden.org/ruby?EventOrientedRuby.
Is it supported by yarv/rite?
Can something like it be implemented with a "pure
jarv" solution? (i.e. without modifying the
interpreter or adding C modules).
Thank you very much for your time,
Aureliano.
___________________________________________________________
1GB gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
http://correo.yahoo.com.ar
More information about the Yarv-devel
mailing list