Ejemplo n.º 1
0
 @JRubyMethod(name = "close!", visibility = PUBLIC)
 public IRubyObject close_bang(ThreadContext context) {
   referenceSet.remove(reaper);
   reaper.released = true;
   _close(context);
   tmpFile.delete();
   return context.getRuntime().getNil();
 }
Ejemplo n.º 2
0
 @JRubyMethod(name = {"unlink", "delete"})
 public IRubyObject unlink(ThreadContext context) {
   if (!tmpFile.exists() || tmpFile.delete()) {
     referenceSet.remove(reaper);
     reaper.released = true;
     path = null;
   }
   return context.getRuntime().getNil();
 }