summaryrefslogtreecommitdiff
path: root/lib/tempfile.rb
AgeCommit message (Collapse)Author
2010-03-29* lib/tempfile.rb (Tempfile#open): re-open with same mode andnobu
options as initialize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-13* lib/tempfile.rb (Tempfile::Remover): new class to replaceakr
Tempfile.callback. port r24902 from Ruby 1.8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-11* lib/tempfile.rb (Tempfile#initialize): option hash may not benobu
given. [ruby-core:26681] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-11* lib/tempfile.rb (Tempfile#initialize): merge mode option.nobu
* lib/tmpdir.rb (Dir::Tmpname#create): splat options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-08* lib/tempfile.rb, lib/tmpdir.rb (Tmpname): extracted new module.nobu
[ruby-dev:39197] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-28* lib/tempfile.rb (Tempfile#make_tmpname): removed thread racenobu
condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-28* lib/tempfile.rb (Tempfile#callback): Debug information should beknu
output to stderr, not stdout; pointed out by akira yamada. cf. [ruby-dev:39072] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-26* lib/tempfile.rb: fixed typos.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-26* lib/tempfile.rb: add documents from Hongli Lai's fork.naruse
cf [ruby-core:25131]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-26* lib/tempfile.rb (Tempfile#close!): should not undefine finalizernobu
by just unlink. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-26* lib/tempfile.rb (Tempfile#close!, Tempfile#path): added sidenobu
notes from Hongli Lai's fork. * lib/tempfile.rb (Tempfile#unlink, Tempfile.callback): do nothing any more once unlinked. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-26* lib/tempfile.rb (Tempfile#unlink): reverted r23494, since thenobu
usage in RubyInline is considered wrong. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-13* lib/tempfile (Tempfile.open): rdoc. patch by Nobuhiro IMAI.yugui
#1694 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-20* lib/tempfile.rb (Tempfile#unlink): close first for Windows. amatz
patch from Florian Frank. [ruby-core:23505] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18* lib/tempfile.rb (Tempfile#initialize): now Tempfile.new takesmatz
keyword arguments to open(). [ruby-dev:36756] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-22* lib/tempfile.rb (Tempfile#open): should return a value from thematz
block (if given). [ruby-core:18394] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-11* lib/tempfile.rb (Tempfile::make_tmpname): Allow to specify aknu
suffix for a temporary file name. * lib/tempfile.rb (Tempfile::make_tmpname): Make temporary file names less predictable by including a random string. [inspired by: akr] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-31 * Merge YARVko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-09* sprintf.c (rb_str_format): allow %c to print one charactermatz
string (e.g. ?x). * lib/tempfile.rb (Tempfile::make_tmpname): put dot between basename and pid. [ruby-talk:196272] * parse.y (do_block): remove -> style block. * parse.y (parser_yylex): remove tLAMBDA_ARG. * eval.c (rb_call0): binding for the return event hook should have consistent scope. [ruby-core:07928] * eval.c (proc_invoke): return behavior should depend whether it is surrounded by a lambda or a mere block. * eval.c (formal_assign): handles post splat arguments. * eval.c (rb_call0): ditto. * st.c (strhash): use FNV-1a hash. * parse.y (parser_yylex): removed experimental ';;' terminator. * eval.c (rb_node_arity): should be aware of post splat arguments. * eval.c (rb_proc_arity): ditto. * parse.y (f_args): syntax rule enhanced to support arguments after the splat. * parse.y (block_param): ditto for block parameters. * parse.y (f_post_arg): mandatory formal arguments after the splat argument. * parse.y (new_args_gen): generate nodes for mandatory formal arguments after the splat argument. * eval.c (rb_eval): dispatch mandatory formal arguments after the splat argument. * parse.y (args): allow more than one splat in the argument list. * parse.y (method_call): allow aref [] to accept all kind of method argument, including assocs, splat, and block argument. * eval.c (SETUP_ARGS0): prepare block argument as well. * lib/mathn.rb (Integer): remove Integer#gcd2. [ruby-core:07931] * eval.c (error_line): print receivers true/false/nil specially. * eval.c (rb_proc_yield): handles parameters in yield semantics. * eval.c (nil_yield): gives LocalJumpError to denote no block error. * io.c (rb_io_getc): now takes one-character string. * string.c (rb_str_hash): use FNV-1a hash from Fowler/Noll/Vo hashing algorithm. * string.c (rb_str_aref): str[0] now returns 1 character string, instead of a fixnum. [Ruby2] * parse.y (parser_yylex): ?c now returns 1 character string, instead of a fixnum. [Ruby2] * string.c (rb_str_aset): no longer support fixnum insertion. * eval.c (umethod_bind): should not update original class. [ruby-dev:28636] * eval.c (ev_const_get): should support constant access from within instance_eval(). [ruby-dev:28327] * time.c (time_timeval): should round for usec floating number. [ruby-core:07896] * time.c (time_add): ditto. * dir.c (sys_warning): should not call a vararg function rb_sys_warning() indirectly. [ruby-core:07886] * numeric.c (flo_divmod): the first element of Float#divmod should be an integer. [ruby-dev:28589] * test/ruby/test_float.rb: add tests for divmod, div, modulo and remainder. * re.c (rb_reg_initialize): should not allow modifying literal regexps. frozen check moved from rb_reg_initialize_m as well. * re.c (rb_reg_initialize): should not modify untainted objects in safe levels higher than 3. * re.c (rb_memcmp): type change from char* to const void*. * dir.c (dir_close): should not close untainted dir stream. * dir.c (GetDIR): add tainted/frozen check for each dir operation. * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_symbol_arg): typo fixed. a patch from Florian Gross <florg at florg.net>. * eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from event_hooks. no guarantee for arbitrary hook deletion. [ruby-dev:28632] * util.c (ruby_strtod): differ addition to minimize error. [ruby-dev:28619] * util.c (ruby_strtod): should not raise ERANGE when the input string does not have any digits. [ruby-dev:28629] * eval.c (proc_invoke): should restore old ruby_frame->block. thanks to ts <decoux at moulon.inra.fr>. [ruby-core:07833] also fix [ruby-dev:28614] as well. * signal.c (trap): sig should be less then NSIG. Coverity found this bug. a patch from Kevin Tew <tewk at tewk.com>. [ruby-core:07823] * math.c (math_log2): add new method inspired by [ruby-talk:191237]. * math.c (math_log): add optional base argument to Math::log(). [ruby-talk:191308] * ext/syck/emitter.c (syck_scan_scalar): avoid accessing uninitialized array element. a patch from Pat Eyler <rubypate at gmail.com>. [ruby-core:07809] * array.c (rb_ary_fill): initialize local variables first. a patch from Pat Eyler <rubypate at gmail.com>. [ruby-core:07810] * ext/syck/yaml2byte.c (syck_yaml2byte_handler): need to free type_tag. a patch from Pat Eyler <rubypate at gmail.com>. [ruby-core:07808] * ext/socket/socket.c (make_hostent_internal): accept ai_family check from Sam Roberts <sroberts at uniserve.com>. [ruby-core:07691] * util.c (ruby_strtod): should not cut off 18 digits for no reason. [ruby-core:07796] * array.c (rb_ary_fill): internalize local variable "beg" to pacify Coverity. [ruby-core:07770] * pack.c (pack_unpack): now supports CRLF newlines. a patch from <tommy at tmtm.org>. [ruby-dev:28601] * applied code clean-up patch from Stefan Huehner <stefan at huehner.org>. [ruby-core:07764] * lib/jcode.rb (String::tr_s): should have translated non squeezing character sequence (i.e. a character) as well. thanks to Hiroshi Ichikawa <gimite at gimite.ddo.jp> [ruby-list:42090] * ext/socket/socket.c: document update patch from Sam Roberts <sroberts at uniserve.com>. [ruby-core:07701] * lib/mathn.rb (Integer): need not to remove gcd2. a patch from NARUSE, Yui <naruse at airemix.com>. [ruby-dev:28570] * parse.y (arg): too much NEW_LIST() * eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen. * eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1. [ruby-dev:28585] * parse.y (arg): use NODE_ARGSCAT for placeholder. * lib/getoptlong.rb (GetoptLong::get): RDoc update patch from mathew <meta at pobox.com>. [ruby-core:07738] * variable.c (rb_const_set): raise error when no target klass is supplied. [ruby-dev:28582] * prec.c (prec_prec_f): documentation patch from <gerardo.santana at gmail.com>. [ruby-core:07689] * bignum.c (rb_big_pow): second operand may be too big even if it's a Fixnum. [ruby-talk:187984] * README.EXT: update symbol description. [ruby-talk:188104] * COPYING: explicitly note GPLv2. [ruby-talk:187922] * parse.y: remove some obsolete syntax rules (unparenthesized method calls in argument list). * eval.c (rb_call0): insecure calling should be checked for non NODE_SCOPE method invocations too. * eval.c (rb_alias): should preserve the current safe level as well as method definition. * process.c (rb_f_sleep): remove RDoc description about SIGALRM which is not valid on the current implementation. [ruby-dev:28464] Thu Mar 23 21:40:47 2006 K.Kosako <sndgk393 AT ybb.ne.jp> * eval.c (method_missing): should support argument splat in super. a bug in combination of super, splat and method_missing. [ruby-talk:185438] * configure.in: Solaris SunPro compiler -rapth patch from <kuwa at labs.fujitsu.com>. [ruby-dev:28443] * configure.in: remove enable_rpath=no for Solaris. [ruby-dev:28440] * ext/win32ole/win32ole.c (ole_val2olevariantdata): change behavior of converting OLE Variant object with VT_ARRAY|VT_UI1 and Ruby String object. * ruby.1: a clarification patch from David Lutterkort <dlutter at redhat.com>. [ruby-core:7508] * lib/rdoc/ri/ri_paths.rb (RI::Paths): adding paths from rubygems directories. a patch from Eric Hodel <drbrain at segment7.net>. [ruby-core:07423] * eval.c (rb_clear_cache_by_class): clearing wrong cache. * ext/extmk.rb: use :remove_destination to install extension libraries to avoid SEGV. [ruby-dev:28417] * eval.c (rb_thread_fd_writable): should not re-schedule output from KILLED thread (must be error printing). * array.c (rb_ary_flatten_bang): allow specifying recursion level. [ruby-talk:182170] * array.c (rb_ary_flatten): ditto. * gc.c (add_heap): a heap_slots may overflow. a patch from Stefan Weil <weil at mail.berlios.de>. * eval.c (rb_call): use separate cache for fcall/vcall invocation. * eval.c (rb_eval): NODE_FCALL, NODE_VCALL can call local functions. * eval.c (rb_mod_local): a new method to specify newly added visibility "local". * eval.c (search_method): search for local methods which are visible only from the current class. * class.c (rb_class_local_methods): a method to list local methods. * object.c (Init_Object): add BasicObject class as a top level BlankSlate class. * ruby.h (SYM2ID): should not cast to signed long. [ruby-core:07414] * class.c (rb_include_module): allow module duplication. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-11* lib/tempfile.rb (Tempfile#unlink): fixed typo.ocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-15* array.c (rb_ary_update): pedantic check to detectmatz
rb_ary_to_ary() to modify the receiver. [ruby-dev:24861] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-19* io.c (read_all): block string buffer modification duringmatz
rb_io_fread() by freezing it temporarily. [ruby-dev:24479] * dir.c (rb_push_glob): block call at once the end of method. [ruby-dev:24487] * ext/enumerator/enumerator.c (enum_each_slice): remove rb_gc_force_recycle() to prevent potential SEGV. [ruby-dev:24499] * ext/zlib/zlib.c (zstream_expand_buffer): hide internal string buffer by clearing klass. [ruby-dev:24510] * ext/socket/socket.c (sock_s_getservbyaname): protocol string might be altered. [ruby-dev:24503] * string.c (rb_str_upto): check if return value from succ is a string. [ruby-dev:24504] * io.c (rb_io_popen): get mode string via rb_io_flags_mode() to avoid mode string modification. [ruby-dev:24454] * io.c (rb_io_getline_fast): should take delim as unsigned char to distinguish EOF and '\377'. [ruby-dev:24460] * io.c (rb_io_getline): add check for RS modification. [ruby-dev:24461] * enum.c (enum_sort_by): use qsort() directly instead using rb_iterate(). [ruby-dev:24462] * enum.c (enum_each_with_index): remove rb_gc_force_recycle() to prevent access to recycled object (via continuation for example). [ruby-dev:24463] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-07* lib/tempfile.rb (Tempfile::initialize): got out code ofakira
generating tmpname. [ruby-dev:23832][ruby-dev:23837] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-07* parse.y (string_content): turn off NODE_NEWLINE flag to avoidmatz
unnecessary line trace for inlined expression. (ruby-bugs PR#1320) * numeric.c (flo_to_s): tweak output string based to preserve decimal point and to remove trailing zeros. [ruby-talk:97891] * string.c (rb_str_index_m): use unsigned comparison for T_FIXNUM search. [ruby-talk:97342] * hash.c (rb_hash_equal): returns true if two hashes have same set of key-value set. [ruby-talk:97559] * hash.c (rb_hash_eql): returns true if two hashes are equal and have same default values. * string.c (rb_str_equal): always returns true or false, never returns nil. [ruby-dev:23404] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-29* exception message clean-up by Ian Macdonald <ian@caliban.org>.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-24* lib/tempfile.rb: fixed a stupid bug. [ruby-talk:95680]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-24* lib/tempfile.rb (Tempfile::_close): should not clear @tmpnamematz
until the file is really removed. [ruby-core:02684] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-23* object.c (rb_mod_cvar_get): new method Module#class_variable_get.matz
* object.c (rb_mod_cvar_set): ditto (Module#class_variable_set). * eval.c (rb_thread_atfork): 1.9 warns no more for thread termination. [ruby-dev:23212] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23* lib/tmpdir.rb (tmpdir): new method. remove TMPDIR.eban
use GetSystemWindowsDirectory(GetSystemDirectory), not GetTempPath. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-21* lib/tmpdir.rb: new library to get temporary directory path,matz
using GetTempPath on Win32 environment. * lib/tempfile.rb: now uses tmpdir.rb. * lib/cgi/session.rb, ib/drb/unix.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-20* lib/tempfile.rb (self.open): If a block is given, call it withknu
tempfile as an argument and automatically close the tempfile when the block terminates. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-23Rename an argument name to avoid a potential clash.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20Fix a fatal typo. (pointed out by Jim Freeze)knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19* lib/tempfile.rb: Embed Rdoc style comments.knu
* lib/tempfile.rb: Add length as an alias for size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19Add Tempfile#close!() as a shorthand for Tempfile#close(true).knu
Add Tempfile#{unlink,delete}(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-18Improve the comment section.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-17* lib/tempfile.rb: Make this libary thread safe.knu
* lib/tempfile.rb: Do not pick a name which was once used and is still scheduled for removal. * lib/tempfile.rb: A lock file need not and must not be scheduled for removal. * lib/tempfile.rb: Compare Max_try with the number of mkdir failures instead of the suffix counter. * lib/tempfile.rb: Overall cleanup and add some important notices. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-04* string.c (rb_str_aset): should raise error if an indexing stringmatz
is not found in the receiver. * sprintf.c (rb_f_sprintf): "%d" should convert objects into integers using Integer(). * lib/tempfile.rb (Tempfile::size): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-05* lib/tempfile.rb: a tempfile must be created with mode 0600.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-06forgot some checkins.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-26* parse.y: clarify do ambiguity, bit more complex but naturalmatz
from my point of view. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-08matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-15matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-06matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-02-292000-02-29matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-08-131.4.0matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e