Changeset 103
- Timestamp:
- 10/05/2006 18:34:25 (2 years ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
bin/sandbox_irb (modified) (1 diff)
-
bin/sandbox_server (modified) (1 diff)
-
ext/sand_table/sand_table.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/sandbox_irb
r94 r103 1 #! /usr/bin/envruby1 #! /scratch/mental/ruby-sandbox/build/../install/bin/ruby 2 2 require 'irb' 3 3 require 'sandbox/server' -
trunk/bin/sandbox_server
r94 r103 1 #! /usr/bin/envruby1 #! /scratch/mental/ruby-sandbox/build/../install/bin/ruby 2 2 require 'optparse' 3 3 require 'ostruct' -
trunk/ext/sand_table/sand_table.c
r102 r103 584 584 sandbox_import_class_path( kit, rb_class2name( klass ), 1 ); 585 585 return Qnil; 586 }587 588 VALUE589 sandbox_safe_go_go_go(str)590 VALUE str;591 {592 return rb_marshal_dump(sandbox_go_go_go(str), Qnil);593 }594 595 /* :nodoc: */596 VALUE597 sandbox_safe_eval( self, str )598 VALUE self, str;599 {600 VALUE marshed;601 sandkit *kit;602 Data_Get_Struct( self, sandkit, kit );603 marshed = sandbox_perform(kit, sandbox_safe_go_go_go, str);604 return rb_marshal_load(marshed);605 586 } 606 587 … … 2830 2811 rb_define_singleton_method( rb_cSandbox, "current", sandbox_current, 0 ); 2831 2812 rb_cSandboxSafe = rb_define_class_under(rb_cSandbox, "Safe", rb_cSandboxFull); 2832 rb_define_method( rb_cSandboxSafe, "_eval", sandbox_safe_eval, 1 );2833 2813 rb_eSandboxException = rb_define_class_under(rb_cSandbox, "Exception", rb_eException); 2834 2814 rb_cSandboxRef = rb_define_class_under(rb_cSandbox, "Ref", rb_cObject);
