I was looking at the encryption logic posted http://blog.leetsoft.com/2006/03/14/simple-encryption and http://blog.leetsoft.com/files/crypto-key.rb.txt there is a call made to File.read( ) to open up RSA keys. THe question is: Does this result in an automatic closure of the file after it is read??? Or...... if not should I do a File.open(), perform my logic, and then explicitly do a File.close() or wrap it in a block to close? Concerned about a File descriptor leak. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
DavidB wrote:> there is a call made to File.read( ) to open up RSA keys. > THe question is: Does this result in an automatic closure of the file after it is read??? >http://www.ruby-doc.org/core/classes/IO.html#M002297 -- -------- Estamos de estreno... si necesitas llevar el control de tus gastos visita http://www.gastosgem.com !!Es gratis!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Javier, Unbelievable-thanks for finding that. I thought I had scoured the API. Thanks again. David On Mar 1, 6:00 pm, javier ramirez <jrami...-7iWCczGtl7hBDgjK7y7TUQ@public.gmane.org> wrote:> DavidBwrote: > > there is a call made to File.read( ) to open up RSA keys. > > THe question is: Does this result in an automatic closure of the file after it is read??? > > http://www.ruby-doc.org/core/classes/IO.html#M002297 > > -- > -------- > Estamos de estreno... si necesitas llevar el control de tus gastos visitahttp://www.gastosgem.com!!Es gratis!!--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---