summaryrefslogtreecommitdiff
path: root/file.c
AgeCommit message (Collapse)Author
2006-08-27Fix documentation submitted by Rick Ohnemus. ruby-Bugs-5529. [ruby-core:08725]drbrain
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-19* file.c (rb_file_s_rename): use errno if set properly.nobu
fixed: [ruby-dev:29293] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-17* file.c (rb_stat_[rRwWxX]): check for super user.nobu
fixed: [ruby-core:08616] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-20* object.c (rb_mod_attr): make Module#attr to be an alias tomatz
attr_reader. [RCR#331] * ruby.h: export classes/modules to implement sandbox. [ruby-core:08283] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-20* eval.c, file.c, etc.: code-cleanup patch from Stefan Huehnermatz
<stefan at huehner.org>. [ruby-core:08029] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-17* eval.c (Init_eval): add aliases invoke_method andmatz
invoke_functional_method corresponding send and funcall respectively. [ruby-talk:197512] * parse.y (parser_yylex): returns the most typical keyword token on EXPR_FNAME. [ruby-core:7995] * ext/socket/socket.c: protoize. * parse.y (then): remove ':' from 'then' and 'do' rules. * hash.c (env_aset): raise TypeError on nil with more descriptive message. [ruby-core:07990] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-06* file.c: commit miss?ocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-06* file.c (cygwin_flock): save old errno.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-06* file.c (rb_thread_flock): ERROR_NOT_LOCKED is not an error on Cygwin.eban
In such situation, flock() should return 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-25* configure.in, dln.c, file.c, intern.h, missing.h (eaccess): usenobu
system routine if provided. fixed: [ruby-core:07195] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-13* file.c (rb_file_s_chmod): avoid warning where sizeof(int) !=ocean
sizeof(void*). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-21(rb_f_test): fix document. [ruby-dev:28087]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-21* file.c (w32_io_info): should return handle because FileIndex isocean
valid only while file is open. [ruby-dev:28088] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-23* file.c (w32_io_info): CreateFile failed on Win9x if file was alreadyocean
opened. (FILE_SHARE_READ was needed, but actually I don't understand the flags of CreateFile well...) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-23* file.c (w32_io_info): should not call GetFileInformationByHandleocean
for pipe. * file.c (w32_io_info): checks return value from rb_w32_get_osfhandle. * file.c (w32_io_info): now can identify directory on WinNT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-22* file.c (test_identical): test if two files are identical.nobu
* file.c (rb_f_test): support DOSISH systems where st_ino is not reliable. fixed: [ruby-core:06672] * win32.h, win32.c (rb_w32_osid): check the running platform. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-22* file.c (rb_file_s_basename): skip slashes just after UNC top slashes.usa
* test/ruby/test_path.rb (test_dirname, test_basename): follow new spec. and add new tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-21* file.c (rb_file_s_basename): DOSISH_UNC is defined on cygwin butnobu
DOSISH is not. fixed: [ruby-dev:27797] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-21* file.c (rb_path_skip_prefix, rb_file_s_basename): UNC without pathnobu
should not be splitted. fixed: [ruby-dev:27776] [ruby-dev:27786] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-18* file.c (rb_file_s_dirname): should use skipprefix for UNC path.usa
pointed out by nobu ([ruby-dev:27744]). fixed: [ruby-core:5076] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-18* file.c (file_s_dirname): added checks for some patterns with driveusa
letter. fixed: [ruby-dev:27738] * test/ruby/test_path.rb (test_dirname): added tests for above patterns. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-15* file.c (file_load_ok): eaccess() returns 0 on success.nobu
fixed: [ruby-dev:27713] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-15* file.c (file_load_ok): use eaccess() instead of actually openingmatz
the file. [ruby-talk:156378] * lib/jcode.rb (String::reverse): add new methods. [ruby-list:41245] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-14* file.c (rb_file_s_readlink): ERANGE will occur only on GPFS.nobu
[ruby-dev:27699] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-10* configure.in: undef HAVE_LINK on BeOS. (link(2) always returnsocean
EINVAL, and this causes error in test/fileutils.) * file.c: overwride chown(2) and fchown(2) on BeOS. (these functions should not change user/group id if -1 is passed as corresponding argument, and this causes error in test/fileutils too) [ruby-dev:27672] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-06* file.c (rb_file_s_readlink): readlink(2) on AIX fails with ERANGE ifnobu
buffer size is less than required. fixed: [ruby-dev:27634] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-20* eval.c, file.c, ruby.c: removed strchr, strrchr, strstr definitionocean
because they are defined in missing.h. * missing.h, missing/strchr.c, missing/strstr.c: ANSI styled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-18* file.c (rb_file_join): elements may contain null pointer strings.nobu
report and fixed by Lloyd Zusman (hippoman): [ruby-core:06326] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-12* file.c (rb_f_test): typos in RDoc comments.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-12* file.c (rb_f_test): typo in RDoc comments.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-11* array.c, enum.c, eval.c, util.c: safer function pointer usage.nobu
fixed: [ruby-core:06143] * util.h (qsort): removed the definition incompatible to ANSI. fixed: [ruby-core:06147] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-05* range.c (rb_range_beg_len): should return Qfalse for non-rangematz
object. * pack.c (EXTEND16): [ruby-dev:27383] * eval.c (set_trace_func): add rb_secure(4) to prevent adding tracing function. * lib/delegate.rb: document update from James Edward Gray II <james@grayproductions.net>. [ruby-core:05942] * process.c (proc_daemon): should restrict execution on levels higher than $SAFE=2. suggested by URABE Shyouhei <shyouhei@ice.uec.ac.jp>. * lib/forwardable.rb: replaced by new implementation from <Daniel.Berger@qwest.com>. [ruby-core:05899] * file.c (path_check_0): disallow sticky world writable directory in PATH (and $LOAD_PATH). [ruby-dev:27226] * numeric.c (fix_idiv): 1.div(1.0) should return integer value. [ruby-dev:27235] * lib/yaml.rb: require 'yaml/constants'. [ruby-core:5776] * lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): add charset information to content-type header.[ruby-core:5127] * lib/xmlrpc/server.rb (CGIServer::serve): ditto. * lib/xmlrpc/server.rb (ModRubyServer::serve): ditto. * lib/xmlrpc/server.rb (WEBrickServlet::service): ditto. * test/dbm/test_dbm.rb (TestDBM::test_s_open_error): remove test_s_open_error test to detect duplicate open. [ruby-dev:27202] * eval.c (splat_value): use to_a to splat non Array object. * object.c (nil_to_a): remove nil.to_a. [experimental] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-28* file.c (rb_stat_inspect): constified.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-20* file.c (rb_stat_inspect): protoized function pointer.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-19* file.c (rb_thread_flock): should have resolved conflict.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-19* io.c (io_close): call rb_io_close() directly if io is a T_FILEmatz
object. [ruby-dev:27156] * file.c (file_expand_path): allow pathnames to expand. [ruby-dev:27152] * numeric.c (Init_Numeric): should define Fixnum#div. [ruby-dev:27129] * file.c (rb_thread_flock): wrap flock(2) by TRAP_BEG and TRAP_END. [ruby-dev:27122] * file.c (rb_file_join): call FilePathValue() to all Pathnames to join. [ruby-dev:27127] * file.c (rb_get_path): call StringValueCStr() to ensure no nul bytes in path strings. * gc.c (garbage_collect): need value for return. [ruby-dev:27127] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-19* file.c (rb_file_chown): should accept nil. [ruby-dev:27171]aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-18* file.c (rb_thread_flock): wrap the flock system call byakr
TRAP_BEG/TRAP_END to enable signals. [ruby-dev:27122] * ext/socket/socket.c (bsock_send): wrap the sendto and send system call by TRAP_BEG/TRAP_END to enable signals when writing to a socket which is full. [ruby-dev:27132] * io.c (rb_io_syswrite): wrap the write system call by TRAP_BEG/TRAP_END to run signal hander in syswrite method. [ruby-dev:27134] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-17* file.c (rb_file_join): convert components by to_s instead of to_str.nobu
fixed: [ruby-dev:27127] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-17* test/socket/test_tcp.rb (TestTCPSocket::test_recvfrom): typomatz
fixed. [ruby-dev:27123] * string.c (rb_str_substr): should propagate taintness even for empty strings. [ruby-dev:27121] * string.c (rb_str_aref): should infect result if range argument is tainted. [ruby-dev:27121] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-16* file.c (rb_file_s_extname): empty string for path name ending with anobu
period. fixed: [ruby-core:05651] * file.c (rb_file_join): smarter behavior at edge cases. fixed: [ruby-core:05706] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14* bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056]ocean
* defines.h, dir.c, dln.h, enumerator.c, env.h, error.c, eval.c, file.c, gc.c, hash.c, inits.c, intern.h, io.c, lex.c, marshal.c, missing.h, node.h, numeric.c, pack.c, process.c, re.h, ruby.c, ruby.h, rubyio.h, rubysig.h, signal.c, sprintf.c, st.h, string.c, struct.c, time.c, util.c, util.h, variable.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-12* file.c (apply2files): stricter callback definition.nobu
* file.c (rb_path_check): constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-12* array.c: moved to ANSI function style from K&R function style.ocean
(used protoize on windows, so still K&R remains on #ifdef part of other platforms. And `foo _((boo))' stuff is still there) [ruby-dev:26975] * bignum.c, class.c, compar.c, dir.c, dln.c, dmyext.c, enum.c, enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c, main.c, marshal.c, math.c, numeric.c, object.c, pack.c, prec.c, process.c, random.c, range.c, re.c, regcomp.c, regenc.c, regerror.c, regexec.c, regparse.c, regparse.h, ruby.c, signal.c, sprintf.c, st.c, string.c, struct.c, time.c, util.h, variable.c, version.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-30* eval.c (rb_eval): pre-evaluate argument for unambiguousmatz
evaluation order. [ruby-dev:26383] * lib/delegate.rb (Delegator::method_missing): forward unknown method to the destination. suggested by <christophe.poucet@gmail.com>. [ruby-talk:146776] * process.c (detach_process_watcher): terminate process watcher thread right after rb_waitpid() succeed. [ruby-talk:146430] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-18* eval.c (search_required, rb_require_safe): expand path innobu
rb_features. [ruby-dev:26079] * file.c (rb_find_file_ext): return absolute path. * ext/extmk.rb: expand path for ext/**/extconf.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-11* dir.c, file.c (lstat): avoid warnings for mingw.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-04* file.c (eaccess): workaround for VC++8 runtime.usa
* win32/win32.c (ioinfo): VC++8 support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-04* array.c: replace rb_protect_inspect() and rb_inspecting_p() bymatz
rb_exec_recursive() in eval.c. * eval.c (rb_exec_recursive): new function. * array.c (rb_ary_join): use rb_exec_recursive(). * array.c (rb_ary_inspect, rb_ary_hash): ditto. * file.c (rb_file_join): ditto. * hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto. * io.c (rb_io_puts): ditto. * object.c (rb_obj_inspect): ditto * struct.c (rb_struct_inspect): ditto. * lib/set.rb (SortedSet::setup): a hack to shut up warning. [ruby-talk:132866] * lib/time.rb (Time::strptime): add new function. inspired by [ruby-talk:132815]. * lib/parsedate.rb (ParseDate::strptime): ditto. * regparse.c: move st_*_strend() functions from st.c. fixed some potential memory leaks. * exception error messages updated. [ruby-core:04497] * ext/socket/socket.c (Init_socket): add bunch of Socket constants. Patch from Sam Roberts <sroberts@uniserve.com>. [ruby-core:04409] * array.c (rb_ary_s_create): no need for negative argc check. [ruby-core:04463] * array.c (rb_ary_unshift_m): ditto. * lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass of StandardError class, not Exception class. [ruby-core:04429] * parse.y (fcall_gen): lvar(arg) will be evaluated as lvar.call(arg) when lvar is a defined local variable. [new] * object.c (rb_class_initialize): call inherited method before calling initializing block. * eval.c (rb_thread_start_1): initialize newly pushed frame. * lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE. fixed: [ruby-core:04444] * eval.c (is_defined): NODE_IASGN is an assignment. * ext/readline/readline.c (Readline.readline): use rl_outstream and rl_instream. [ruby-dev:25699] * ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check [ruby-dev:25675] * misc/ruby-mode.el: [ruby-core:04415] * lib/rdoc/generators/html_generator.rb: [ruby-core:04412] * lib/rdoc/generators/ri_generator.rb: ditto. * struct.c (make_struct): fixed: [ruby-core:04402] * ext/curses/curses.c (window_color_set): [ruby-core:04393] * ext/socket/socket.c (Init_socket): SO_REUSEPORT added. [ruby-talk:130092] * object.c: [ruby-doc:818] * parse.y (open_args): fix too verbose warnings for the space before argument parentheses. [ruby-dev:25492] * parse.y (parser_yylex): ditto. * parse.y (parser_yylex): the first expression in the parentheses should not be a command. [ruby-dev:25492] * lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330] * object.c (Init_Object): remove Object#type. [ruby-core:04335] * st.c (st_foreach): report success/failure by return value. [ruby-Bugs-1396] * parse.y: forgot to initialize parser struct. [ruby-dev:25492] * parse.y (parser_yylex): no tLABEL on EXPR_BEG. [ruby-talk:127711] * document updates - [ruby-core:04296], [ruby-core:04301], [ruby-core:04302], [ruby-core:04307] * dir.c (rb_push_glob): should work for NUL delimited patterns. * dir.c (rb_glob2): should aware of offset in the pattern. * string.c (rb_str_new4): should propagate taintedness. * env.h: rename member names in struct FRAME; last_func -> callee, orig_func -> this_func, last_class -> this_class. * struct.c (rb_struct_set): use original method name, not callee name, to retrieve member slot. [ruby-core:04268] * time.c (time_strftime): protect from format modification from GC finalizers. * object.c (Init_Object): remove rb_obj_id_obsolete() * eval.c (rb_mod_define_method): incomplete subclass check. [ruby-dev:25464] * gc.c (rb_data_object_alloc): klass may be NULL. [ruby-list:40498] * bignum.c (rb_big_rand): should return positive random number. [ruby-dev:25401] * bignum.c (rb_big_rand): do not use rb_big_modulo to generate random bignums. [ruby-dev:25396] * variable.c (rb_autoload): [ruby-dev:25373] * eval.c (svalue_to_avalue): [ruby-dev:25366] * string.c (rb_str_justify): [ruby-dev:25367] * io.c (rb_f_select): [ruby-dev:25312] * ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072] * struct.c (make_struct): [ruby-dev:25249] * dir.c (dir_open_dir): new function. [ruby-dev:25242] * io.c (rb_f_open): add type check for return value from to_open. * lib/pstore.rb (PStore#transaction): Use the empty content when a file is not found. [ruby-dev:24561] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-02typo fixakr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e