Keep temporary files

In a project I am working on, Tempfile objects are used. Fine, but I
would like to add an option "keep temp file", in order to facilitate
debug in case of error.

It seems that Tempfile object doesn't provide any way to do that. Would
you think it could a possible enhancement?

I am surprised to not find any other thread about this limitation on
google...

···

--
Posted via http://www.ruby-forum.com/.

Quoting J??r??me R. (lists@ruby-forum.com):

In a project I am working on, Tempfile objects are used. Fine, but I
would like to add an option "keep temp file", in order to facilitate
debug in case of error.

It seems that Tempfile object doesn't provide any way to do that. Would
you think it could a possible enhancement?

I think it may be an enhancement for your program, not for Tempfile:
the reson for existence of that class is to make sure the files it
handle will be deleted as soon as they get closed.

If you want to keep your files, designate a directory for them (I
generally create a directory under /usr/share) and give to them names
that include the time and date (to make sure there are no risk of
duplicate names). Something like:

FILE_PATH='/usr/share/myproject/'

def file_name
  FILE_PATH+'file.'+Time::now.strftime('%y%m%d.%H%M%S')
end

You then may want to write a cleanup script that makes sure files
older than a few weeks/months are deleted.

Carlo

···

Subject: Keep temporary files
  Date: Wed 02 Jan 13 07:14:18AM +0900

--
  * Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe
  * di parlare tanto di amore e di rettitudine? (Chuang-Tzu)

<a href="http://saadel.com " target="_blank">سديل</a>
<a href="http://saadel.com/category/fashion-dresses"
target="_blank">فساتين</a>
<a href="http://saadel.com/category/main" target="_blank">مواضيع
عامية</a>
<a href="http://saadel.com/category/decor " target="_blank">ديكور</a>
<a href="http://saadel.com/category/recipes " target="_blank">خلطات</a>
<a href="http://saadel.com/category/baby-care " target="_blank">العناية
بالطفل</a>
<a href="http://saadel.com/category/hair-care " target="_blank">العناية
بالشعر</a>
<a href="http://saadel.com/category/skin-care " target="_blank">العناية
بالبشرة</a>
<a href="http://saadel.com/category/pregnant " target="_blank">حوامل</a>
<a href="http://saadel.com/8309.html " target="_blank">صور قصات شعر
اطفال</a>
<a href="http://saadel.com/3905.html " target="_blank"> فساتين</a>
<a href="http://saadel.com/3905.html " target="_blank"> فساتين 2013 </a>
<a href="http://saadel.com/1815.html " target="_blank">فساتين سحر
الشرق</a>
<a href=" http://saadel.com/7223.html " target="_blank">مكياج لبناني</a>
<a href="http://saadel.com/2554.html " target="_blank">ازياء فساتين</a>

<a href="http://saadel.com/category/skin-care/page/51 "
target="_blank">العنايه بالبشره</a>
<a href="http://saadel.com/5353.html " target="_blank">افضل خلطات للبشرة
</a>
<a href="http://saadel.com/5350.html " target="_blank">ماسكات لتفتيح
البشره الدهنيه</a>
<a href="http://saadel.com/5347.html " target="_blank">لتفتيح البشره
الدهنيه</a>
<a href="http://saadel.com/5344.html " target="_blank">ماسك لتفتيح
البشره الدهنيه</a>

<a href="http://saadel.com/category/skin-care/page/50 "
target="_blank">العنايه باليشره</a>
<a href="http://saadel.com/5416.html " target="_blank">تبيض البشرة
للرجال</a>
<a href="http://saadel.com/5179.html " target="_blank">كيف تبيض
البشره</a>
<a href="http://saadel.com/5399.html " target="_blank">خلطات للبشرة
الدهنية</a>
<a href="http://saadel.com/5396.html " target="_blank">خلطات طبيعية
للبشرة الجافة</a>
<a href="http://saadel.com/5392.html " target="_blank">خلطات طبيعية
للبشرة الحساسة</a>
<a href="http://saadel.com/5388.html " target="_blank">خلطات طبيعية
للبشرة</a>
<a href="http://saadel.com/5385.html " target="_blank">منتدى خلطات
للبشره</a>
<a href="http://saadel.com/5382.html " target="_blank">خلطات طبيعية
للبشرة الدهنية</a>
<a href="http://saadel.com/5379.html " target="_blank">خلطات للبشرة</a>
<a href="http://saadel.com/5376.html " target="_blank">خلطات تقشير
للبشره</a>

<a href="http://saadel.com/category/skin-care/page/49 "
target="_blank">العنايه بالبشره</a>
<a href="http://saadel.com/5528.html " target="_blank">زيوت تبيض
البشرة</a>
<a href="http://saadel.com/5525.html " target="_blank">خلطات طبية لتبيض
البشرة</a>
<a href="http://saadel.com/5518.html " target="_blank">تبيض البشرة
طبيعي</a>
<a href="http://saadel.com/5509.html " target="_blank">تبيض البشره
بالليزر</a>
<a href="http://saadel.com/5467.html " target="_blank">تبيض البشرة
والجسم</a>
<a href="http://saadel.com/5437.html " target="_blank">اعشاب تبيض
البشره</a>
<a href="http://saadel.com/5435.html " target="_blank">ماسكات تبيض
البشرة</a>
<a href="http://saadel.com/5424.html " target="_blank">تبيض البشرة
السوداء</a>
<a href="http://saadel.com/5422.html " target="_blank">تبيض البشره
بسرعه</a>
<a href="http://saadel.com/5419.html " target="_blank">تبيض البشره
السمراء</a>

<a href="http://saadel.com/category/skin-care/page/48 " target="_blank">
العنايه بالبشره</a>
<a href="http://saadel.com/5566.html " target="_blank">خلطات تفتح البشره
</a>
<a href="http://saadel.com/5559.html " target="_blank">كريم تبيض
البشره</a>
<a href="http://saadel.com/5562.html " target="_blank">خلطات مجربه
لتفتيح البشره</a>
<a href="http://saadel.com/5542.html " target="_blank">افضل خلطات لتفتيح
البشره</a>
<a href="http://saadel.com/5556.html " target="_blank">منتجات تبيض
البشرة</a>

<a href=" http://saadel.com/category/skin-care/page/54 "
target="_blank">العنايه بالبشره </a>
<a href=" http://saadel.com/5062.html " target="_blank">تبيض البشره </a>
<a href=" http://saadel.com/5049.html " target="_blank">خلطات تبيض
البشرة الجافة </a>
<a href=" http://saadel.com/5039.html " target="_blank">علاج تبيض البشره
</a>
<a href=" http://saadel.com/5035.html " target="_blank">طريقة تبيض
البشره </a>
<a href=" http://saadel.com/5023.html " target="_blank">طريقة تبيض
البشره </a>
<a href=" http://saadel.com/5009.html " target="_blank">تبيض البشره
طبيعي </a>

<a href=" http://saadel.com/category/skin-care/page/53 "
target="_blank">العنايه بالبشره </a>
<a href=" http://saadel.com/5123.html " target="_blank">ابر تبيض البشره
</a>
<a href=" http://saadel.com/5120.html " target="_blank">عمليات تبيض
البشرة </a>
<a href=" http://saadel.com/5117.html " target="_blank">قناع تبيض البشره
</a>
<a href=" http://saadel.com/5114.html " target="_blank">تبيض البشره
طبيعيا </a>
<a href=" http://saadel.com/5112.html " target="_blank">مشروبات تبيض
البشره </a>
<a href=" http://saadel.com/5110.html " target="_blank">اقنعه تبيض
البشره </a>
<a href=" http://saadel.com/5108.html " target="_blank">تبيض البشره
الحساسه </a>
<a href=" http://saadel.com/5097.html " target="_blank">كريم لتفتيح
البشره الدهنيه </a>
<a href=" http://saadel.com/5094.html " target="_blank">افضل كريم
لتفتيح البشره الدهنيه </a>
<a href=" http://saadel.com/5090.html " target="_blank">ماسكات لتفتيح
البشرة الدهنية بسرعة </a>

<a href=" http://saadel.com/category/skin-care/page/52 "
target="_blank">العنايه بالبشره </a>
<a href=" http://saadel.com/5338.html " target="_blank">ماسكات طبيعية
لتفتيح البشرة الدهنية </a>
<a href=" http://saadel.com/5335.html " target="_blank">مسكات لتفتيح
البشره الدهنيه </a>
<a href=" http://saadel.com/5332.html " target="_blank">طريقة لتفتيح
البشرة الدهنية </a>
<a href=" http://saadel.com/5329.html " target="_blank">ماسكات لتفتيح
البشرة الدهنية بسرعة </a>
<a href=" http://saadel.com/5326.html " target="_blank">طرق لتفتيح
البشرة الدهنية </a>
<a href=" http://saadel.com/5323.html " target="_blank">وصفه لتفتيح
البشره الدهنيه </a>
<a href=" http://saadel.com/5168.html " target="_blank">تبيض البشره
الجافه </a>
<a href=" http://saadel.com/5129.html " target="_blank">تبيض البشره
بالاعشاب </a>
<a href=" http://saadel.com/5127.html " target="_blank">وصفه تبيض البشره
</a>
<a href=" http://saadel.com/5125.html " target="_blank">صابون تبيض
البشره </a>
<a href=" http://saadel.com/category/skin-care/page/51 "
target="_blank">العنايه بالبشره </a>
<a href=" http://saadel.com/5373.html " target="_blank">خلطات للبشرة
طبيعية </a>
<a href=" http://saadel.com/5369.html " target="_blank">خلطات للبشرة
الجافة </a>
<a href=" http://saadel.com/5366.html " target="_blank">خلطات تبييض
للبشرة </a>
<a href=" http://saadel.com/5363.html " target="_blank">خلطات تفتيح
للبشره </a>
<a href=" http://saadel.com/5360.html " target="_blank">خلطات للبشره
تبيض </a>
<a href=" http://saadel.com/5357.html " target="_blank">خلطات تبيض
للبشرة </a>

<a href="http://saadel.com " target="_blank">سديل</a>
<a href="http://saadel.com " target="_blank">سديل</a>
<a href="http://saadel.com " target="_blank">سديل</a>
<a href="http://saadel.com " target="_blank">سديل</a>
<a href="http://saadel.com " target="_blank">سديل</a>
<a href="http://saadel.com " target="_blank">سديل</a>
<a href="http://saadel.com " target="_blank">سديل</a>
<a href="http://saadel.com " target="_blank">سديل</a>
<a href=" http://saadel.com/category/skin-care/page/57 "
target="_blank">العنايه بالبشره</a>
<a href="http://saadel.com/4896.html " target="_blank">خلطة كريمات تبيض
البشرة</a>
<a href="http://saadel.com/4891.html " target="_blank">خلاطات تبيض
البشره</a>
<a href="http://saadel.com/182.html " target="_blank">موديلات فساتين
الاعراس 2013</a>
<a href=" http://saadel.com/166.html " target="_blank">فساتين الاعراس
2013</a>
<a href=" http://saadel.com/84.html " target="_blank">اروع ميك اب بنات
كشخة</a>
<a href="http://saadel.com/67.html " target="_blank">تشكيلة مستحضرات
العناية بالجسم</a>

<a href="http://saadel.com/category/skin-care/page/56 "
target="_blank">العنايه بالبشره</a>
<a href=" http://saadel.com/4956.html " target="_blank">افضل طريقة
للعناية بالبشرة الدهنية</a>
<a href="http://saadel.com/4952.html " target="_blank">كيف العناية
بالبشرة الدهنية</a>
<a href="http://saadel.com/4948.html " target="_blank">العناية اليومية
بالبشرة الدهنية</a>
<a href="http://saadel.com/4945.html " target="_blank">العناية بالبشرة
الدهنية في الصيف</a>
<a href="http://saadel.com/4939.html " target="_blank">خلطات العناية
بالبشرة الدهنية</a>
<a href="http://saadel.com/4926.html " target="_blank">علاج البشره
الدهنيه</a>
<a href="http://saadel.com/4923.html " target="_blank">علاج البشرة
الجافة</a>
<a href="http://saadel.com/4920.html " target="_blank">طرق علاج البشره
</a>
<a href=" http://saadel.com/4916.html " target="_blank">البشره الجافه
علاج</a>
<a href=" http://saadel.com/4898.html " target="_blank">ماسك تبيض
البشره</a>

<a href="http://saadel.com/category/skin-care/page/55 "
target="_blank">العنايه بالبشره</a>
<a href="http://saadel.com/5006.html " target="_blank">خلطة تبيض البشرة
الدهنية</a>
<a href=" http://saadel.com/4995.html " target="_blank">كيف تبيض
البشره</a>
<a href="http://saadel.com/4989.html " target="_blank">تبيض البشرة
السوداء</a>
<a href="http://saadel.com/4983.html " target="_blank">العناية بالبشرة
الدهنية</a>
<a href=" http://saadel.com/4980.html " target="_blank">عناية بالبشرة
الدهنية</a>
<a href="http://saadel.com/4977.html " target="_blank">كيفية العناية
بالبشرة الدهنية</a>
<a href="http://saadel.com/4973.html " target="_blank">طريقة العناية
بالبشرة الدهنية</a>
<a href="http://saadel.com/4970.html " target="_blank">طرق العناية
بالبشرة الدهنية</a>
<a href="http://saadel.com/4965.html " target="_blank">العناية بالبشرة
الدهنية طبيعيا</a>
<a href="http://saadel.com/4960.html " target="_blank">منتجات العناية
بالبشرة الدهنية</a>
<a href="http://saadel.com/category/skin-care/page/54 "
target="_blank">العنايه بالبشره</a>
<a href="http://saadel.com/5085.html " target="_blank">افضل خلطه لتفتيح
البشره </a>
<a href=" http://saadel.com/5082.html " target="_blank">خلطة لتفتيح
البشرة الجافة</a>
<a href=" http://saadel.com/5079.html " target="_blank">تبيض البشره
الدهنيه</a>
<a href="http://saadel.com/5069.html " target="_blank">خلطات تبيض البشرة
الدهنية</a>

···

--
Posted via http://www.ruby-forum.com/.

<p><a class="comment-url"
href="http://saadel.com/category/fashion-dresses ">فساتين</a>
<p><a class="comment-url" href="http://saadel.com/category/main ">مواضيع
عامية</a>
<p><a class="comment-url" href="http://saadel.com/category/decor
">ديكور</a>
<p><a class="comment-url" href="http://saadel.com/category/recipes
">خلطات</a>
<p><a class="comment-url" href="http://saadel.com/category/baby-care
">العناية بالطفل</a>
<p><a class="comment-url" href="http://saadel.com/category/hair-care
">العناية بالشعر</a>
<p><a class="comment-url" href="http://saadel.com/category/skin-care
">العناية بالبشرة</a>
<p><a class="comment-url" href="http://saadel.com/category/pregnant
">حوامل</a>
<p><a class="comment-url" href="http://saadel.com/8309.html ">صور قصات
شعر اطفال</a>
<p><a class="comment-url" href="http://saadel.com/3905.html ">فساتين
2013 </a>
<p><a class="comment-url" href="http://saadel.com/3905.html ">فساتين
</a>
<p><a class="comment-url" href="http://saadel.com/1815.html ">فساتين
سحر الشرق</a>
<p><a class="comment-url" href="http://saadel.com/7223.html ">مكياج
لبناني</a>
<p><a class="comment-url" href="http://saadel.com/2554.html ">ازياء
فساتين</a>
<p><a class="comment-url" href="http://saadel.com ">سديل</a>

<p><a class="comment-url"
href="http://saadel.com/category/skin-care/page/51 ">العنايه
بالبشره</a>
<p><a class="comment-url" href="http://saadel.com/5353.html ">افضل
خلطات للبشرة </a>
<p><a class="comment-url" href="http://saadel.com/5350.html ">ماسكات
لتفتيح البشره الدهنيه</a>
<p><a class="comment-url" href="http://saadel.com/5347.html ">لتفتيح
البشره الدهنيه</a>
<p><a class="comment-url" href="http://saadel.com/5344.html ">ماسك
لتفتيح البشره الدهنيه</a>

<p><a class="comment-url"
href="http://saadel.com/category/skin-care/page/50 ">العنايه
باليشره</a>
<p><a class="comment-url" href="http://saadel.com/5416.html ">تبيض
البشرة للرجال</a>
<p><a class="comment-url" href="http://saadel.com/5179.html ">كيف تبيض
البشره</a>
<p><a class="comment-url" href="http://saadel.com/5399.html ">خلطات
للبشرة الدهنية</a>
<p><a class="comment-url" href="http://saadel.com/5396.html ">خلطات
طبيعية للبشرة الجافة</a>
<p><a class="comment-url" href="http://saadel.com/5392.html ">خلطات
طبيعية للبشرة الحساسة</a>
<p><a class="comment-url" href="http://saadel.com/5388.html ">خلطات
طبيعية للبشرة</a>
<p><a class="comment-url" href="http://saadel.com/5385.html ">منتدى
خلطات للبشره</a>
<p><a class="comment-url" href="http://saadel.com/5382.html ">خلطات
طبيعية للبشرة الدهنية</a>
<p><a class="comment-url" href="http://saadel.com/5379.html ">خلطات
للبشرة</a>
<p><a class="comment-url" href="http://saadel.com/5376.html ">خلطات
تقشير للبشره</a>

<p><a class="comment-url"
href="http://saadel.com/category/skin-care/page/49 ">العنايه
بالبشره</a>
<p><a class="comment-url" href="http://saadel.com/5528.html ">زيوت تبيض
البشرة</a>
<p><a class="comment-url" href="http://saadel.com/5525.html ">خلطات
طبية لتبيض البشرة</a>
<p><a class="comment-url" href="http://saadel.com/5518.html ">تبيض
البشرة طبيعي</a>
<p><a class="comment-url" href="http://saadel.com/5509.html ">تبيض
البشره بالليزر</a>
<p><a class="comment-url" href="http://saadel.com/5467.html ">تبيض
البشرة والجسم</a>
<p><a class="comment-url" href="http://saadel.com/5437.html ">اعشاب
تبيض البشره</a>
<p><a class="comment-url" href="http://saadel.com/5435.html ">ماسكات
تبيض البشرة</a>
<p><a class="comment-url" href="http://saadel.com/5424.html ">تبيض
البشرة السوداء</a>
<p><a class="comment-url" href="http://saadel.com/5422.html ">تبيض
البشره بسرعه</a>
<p><a class="comment-url" href="http://saadel.com/5419.html ">تبيض
البشره السمراء</a>

<p><a class="comment-url"
href="http://saadel.com/category/skin-care/page/48 ">
العنايه بالبشره</a>
<p><a class="comment-url" href="http://saadel.com/5566.html ">خلطات
تفتح البشره </a>
<p><a class="comment-url" href="http://saadel.com/5559.html ">كريم تبيض
البشره</a>
<p><a class="comment-url" href="http://saadel.com/5562.html ">خلطات
مجربه لتفتيح البشره</a>
<p><a class="comment-url" href="http://saadel.com/5542.html ">افضل
خلطات لتفتيح البشره</a>
<p><a class="comment-url" href="http://saadel.com/5556.html ">منتجات
تبيض البشرة</a>

<p><a class="comment-url" href="
http://saadel.com/category/skin-care/page/54 ">العنايه بالبشره </a>
<p><a class="comment-url" href=" http://saadel.com/5062.html ">تبيض
البشره </a>
<p><a class="comment-url" href=" http://saadel.com/5049.html ">خلطات
تبيض البشرة الجافة </a>
<p><a class="comment-url" href=" http://saadel.com/5039.html ">علاج
تبيض البشره </a>
<p><a class="comment-url" href=" http://saadel.com/5035.html ">طريقة
تبيض البشره </a>
<p><a class="comment-url" href=" http://saadel.com/5023.html ">طريقة
تبيض البشره </a>
<p><a class="comment-url" href=" http://saadel.com/5009.html ">تبيض
البشره طبيعي </a>

<p><a class="comment-url" href="
http://saadel.com/category/skin-care/page/53 ">العنايه بالبشره </a>
<p><a class="comment-url" href=" http://saadel.com/5123.html ">ابر تبيض
البشره </a>
<p><a class="comment-url" href=" http://saadel.com/5120.html ">عمليات
تبيض البشرة </a>
<p><a class="comment-url" href=" http://saadel.com/5117.html ">قناع
تبيض البشره </a>
<p><a class="comment-url" href=" http://saadel.com/5114.html ">تبيض
البشره طبيعيا </a>
<p><a class="comment-url" href=" http://saadel.com/5112.html ">مشروبات
تبيض البشره </a>
<p><a class="comment-url" href=" http://saadel.com/5110.html ">اقنعه
تبيض البشره </a>
<p><a class="comment-url" href=" http://saadel.com/5108.html ">تبيض
البشره الحساسه </a>
<p><a class="comment-url" href=" http://saadel.com/5097.html ">كريم
لتفتيح البشره الدهنيه </a>
<p><a class="comment-url" href=" http://saadel.com/5094.html ">افضل
كريم لتفتيح البشره الدهنيه</a>
<p><a class="comment-url" href=" http://saadel.com/5090.html ">ماسكات
لتفتيح البشرة الدهنية بسرعة </a>

<p><a class="comment-url" href="
http://saadel.com/category/skin-care/page/52 ">العنايه بالبشره </a>
<p><a class="comment-url" href=" http://saadel.com/5338.html ">ماسكات
طبيعية لتفتيح البشرة الدهنية </a>
<p><a class="comment-url" href=" http://saadel.com/5335.html ">مسكات
لتفتيح البشره الدهنيه </a>
<p><a class="comment-url" href=" http://saadel.com/5332.html ">طريقة
لتفتيح البشرة الدهنية </a>
<p><a class="comment-url" href=" http://saadel.com/5329.html ">ماسكات
لتفتيح البشرة الدهنية بسرعة </a>
<p><a class="comment-url" href=" http://saadel.com/5326.html ">طرق
لتفتيح البشرة الدهنية </a>
<p><a class="comment-url" href=" http://saadel.com/5323.html ">وصفه
لتفتيح البشره الدهنيه </a>
<p><a class="comment-url" href=" http://saadel.com/5168.html ">تبيض
البشره الجافه </a>
<p><a class="comment-url" href=" http://saadel.com/5129.html ">تبيض
البشره بالاعشاب </a>
<p><a class="comment-url" href=" http://saadel.com/5127.html ">وصفه
تبيض البشره </a>
<p><a class="comment-url" href=" http://saadel.com/5125.html ">صابون
تبيض البشره </a>
<p><a class="comment-url" href="
http://saadel.com/category/skin-care/page/51 ">العنايه بالبشره </a>
<p><a class="comment-url" href=" http://saadel.com/5373.html ">خلطات
للبشرة طبيعية </a>
<p><a class="comment-url" href=" http://saadel.com/5369.html ">خلطات
للبشرة الجافة </a>
<p><a class="comment-url" href=" http://saadel.com/5366.html ">خلطات
تبييض للبشرة </a>
<p><a class="comment-url" href=" http://saadel.com/5363.html ">خلطات
تفتيح للبشره </a>
<p><a class="comment-url" href=" http://saadel.com/5360.html ">خلطات
للبشره تبيض </a>
<p><a class="comment-url" href=" http://saadel.com/5357.html ">خلطات
تبيض للبشرة </a>

<p><a class="comment-url" href="http://saadel.com/category/decor
">ديكور</a>
<p><a class="comment-url" href="http://saadel.com/category/decor
">ديكور</a>
<p><a class="comment-url" href="http://saadel.com/category/decor
">ديكور</a>
<p><a class="comment-url" href="http://saadel.com/category/decor
">ديكور</a>
<p><a class="comment-url" href="http://saadel.com/category/decor
">ديكور</a>
<p><a class="comment-url" href="http://saadel.com/category/decor
">ديكور</a>
<p><a class="comment-url" href="http://saadel.com/category/decor
">ديكور</a>
<p><a class="comment-url" href="http://saadel.com/category/decor
">ديكور</a>
<p><a class="comment-url" href="
http://saadel.com/category/skin-care/page/57 ">العنايه بالبشره</a>
<p><a class="comment-url" href="http://saadel.com/4896.html ">خلطة
كريمات تبيض البشرة</a>
<p><a class="comment-url" href="http://saadel.com/4891.html ">خلاطات
تبيض البشره</a>
<p><a class="comment-url" href="http://saadel.com/182.html ">موديلات
فساتين الاعراس 2013</a>
<p><a class="comment-url" href=" http://saadel.com/166.html ">فساتين
الاعراس 2013</a>
<p><a class="comment-url" href=" http://saadel.com/84.html ">اروع ميك
اب بنات كشخة</a>
<p><a class="comment-url" href="http://saadel.com/67.html ">تشكيلة
مستحضرات العناية بالجسم</a>

<p><a class="comment-url"
href="http://saadel.com/category/skin-care/page/56 ">العنايه
بالبشره</a>
<p><a class="comment-url" href=" http://saadel.com/4956.html ">افضل
طريقة للعناية بالبشرة الدهنية</a>
<p><a class="comment-url" href="http://saadel.com/4952.html ">كيف
العناية بالبشرة الدهنية</a>
<p><a class="comment-url" href="http://saadel.com/4948.html ">العناية
اليومية بالبشرة الدهنية</a>
<p><a class="comment-url" href="http://saadel.com/4945.html ">العناية
بالبشرة الدهنية في الصيف</a>
<p><a class="comment-url" href="http://saadel.com/4939.html ">خلطات
العناية بالبشرة الدهنية</a>
<p><a class="comment-url" href="http://saadel.com/4926.html ">علاج
البشره الدهنيه</a>
<p><a class="comment-url" href="http://saadel.com/4923.html ">علاج
البشرة الجافة</a>
<p><a class="comment-url" href="http://saadel.com/4920.html ">طرق علاج
البشره </a>
<p><a class="comment-url" href=" http://saadel.com/4916.html ">البشره
الجافه علاج</a>
<p><a class="comment-url" href=" http://saadel.com/4898.html ">ماسك
تبيض البشره</a>

<p><a class="comment-url"
href="http://saadel.com/category/skin-care/page/55 ">العنايه
بالبشره</a>
<p><a class="comment-url" href="http://saadel.com/5006.html ">خلطة تبيض
البشرة الدهنية</a>
<p><a class="comment-url" href=" http://saadel.com/4995.html ">كيف تبيض
البشره</a>
<p><a class="comment-url" href="http://saadel.com/4989.html ">تبيض
البشرة السوداء</a>
<p><a class="comment-url" href="http://saadel.com/4983.html ">العناية
بالبشرة الدهنية</a>
<p><a class="comment-url" href=" http://saadel.com/4980.html ">عناية
بالبشرة الدهنية</a>
<p><a class="comment-url" href="http://saadel.com/4977.html ">كيفية
العناية بالبشرة الدهنية</a>
<p><a class="comment-url" href="http://saadel.com/4973.html ">طريقة
العناية بالبشرة الدهنية</a>
<p><a class="comment-url" href="http://saadel.com/4970.html ">طرق
العناية بالبشرة الدهنية</a>
<p><a class="comment-url" href="http://saadel.com/4965.html ">العناية
بالبشرة الدهنية طبيعيا</a>
<p><a class="comment-url" href="http://saadel.com/4960.html ">منتجات
العناية بالبشرة الدهنية</a>
<p><a class="comment-url"
href="http://saadel.com/category/skin-care/page/54 ">العنايه
بالبشره</a>
<p><a class="comment-url" href="http://saadel.com/5085.html ">افضل خلطه
لتفتيح البشره </a>
<p><a class="comment-url" href=" http://saadel.com/5082.html ">خلطة
لتفتيح البشرة الجافة</a>
<p><a class="comment-url" href=" http://saadel.com/5079.html ">تبيض
البشره الدهنيه</a>
<p><a class="comment-url" href="http://saadel.com/5069.html ">خلطات
تبيض البشرة الدهنية</a>

···

--
Posted via http://www.ruby-forum.com/.

You just need to create a class with the same interface as Tempfile
and use that interchangeably with Tempfile - depending on whether you
want to keep or get rid of temp files. Or you add that option to your
version of Tempfile if you need to decide this while you go.

Kind regards

robert

···

On Tue, Jan 1, 2013 at 11:14 PM, Jérôme R. <lists@ruby-forum.com> wrote:

In a project I am working on, Tempfile objects are used. Fine, but I
would like to add an option "keep temp file", in order to facilitate
debug in case of error.

It seems that Tempfile object doesn't provide any way to do that. Would
you think it could a possible enhancement?

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

It seems that Tempfile object doesn't provide any way to do that. Would
you think it could a possible enhancement?

I am surprised to not find any other thread about this limitation on
google...

You can use the extra argument to Tempfile#close to keep tempfiles
around until the object is GCed.

If you want to keep temp files forever, you will have to look at the
advice already given elsewhere in this thread.

greetings,
kaspar