Sha256: 66b08ee27007569520e8ac167258978a8b2ab50c4931e78513e914ef346aed55
Contents?: true
Size: 709 Bytes
Versions: 1
Compression:
Stored size: 709 Bytes
Contents
module Gjman module Rjb class << self def initialize @initialized ||= ( ::Rjb::load([Gjman::JAVA_LIBS, Gjman.root('gjman','java_hacks')].flatten.join(':')) @forbid_system_exit = classify('ForbidSystemExit') @forbid_system_exit_error = @forbid_system_exit.class.const_get(:Exception) true ) end def classify(klass) ::Rjb.import(klass) end def sandbox(&block) initialize begin @forbid_system_exit.apply @result = yield rescue @forbid_system_exit_error @result ensure @forbid_system_exit.unapply end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gjman-0.1.0 | lib/gjman/rjb.rb |