summaryrefslogtreecommitdiff
path: root/dir.c
AgeCommit message (Collapse)Author
2011-01-13update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-08* dir.c: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-21* dir.c (dir_initialize): remove useless intermediate variable.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-20* dir.c (bracket): get rid of scanning at the end of the patternnobu
string, not to raise an exception while globbing command line. [ruby-core:32478] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-10* class.c (rb_scan_args): Add support for optional keywordknu
argument hash. * README.EXT, README.EXT.ja: Update documentation accordingly. * dir.c (dir_initialize): Make use of the new rb_scan_args() feature. * io.c (rb_io_s_popen, rb_scan_open_args, rb_io_initialize) (rb_io_s_pipe, open_key_args, io_s_foreach, io_s_readlines) (rb_io_s_read, rb_io_set_encoding): Ditto. * transcode.c (str_transcode, econv_args) (econv_primitive_convert): Ditto. * ext/zlib/zlib.c (rb_gzreader_initialize): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-08* dir.c (sys_warning_1): show error message.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05* dir.c (glob_make_pattern): fold continuous PLAINs to get rid ofnobu
snail at too deep path. [ruby-dev:41871] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-27* class.c, compile.c, dir.c, file.c, iseq.c, parse.y, random.c:naruse
clean unused-value warnings. * cont.c, process.c, vm_exec.h: clean cast warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-18* include/ruby/ruby.h (rb_data_type_t): restructured. [ruby-dev:41862]nobu
add parent member. * error.c (rb_typeddata_inherited_p): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-04Clarification of what '*' matches. Patch by John Wells <john.wells at ↵drbrain
greatworx.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17* array.c: Documentation: change => in call-seq to ->.marcandre
Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-13* array.c: Harmonize documentation, in particular regarding:marcandre
- methods returning enumerators - array methods and argument naming (array -> ary, an_array -> new_ary) - minor improvements, typo fixed and styling issues Other documentation errors fixed: - return value was self instead of a new array (or vice-versa) for Array#{pop,shift,permutation,repeated_permutation,keep_if} - Array#rindex was missing the form with a block. * dir.c: ditto. * enum.c: ditto. Modified Enumerable#reverse_each' documentation to clarify that #each will be finish before any element is yielded. * error.c: ditto. * gc.c: ditto. * hash.c: ditto. * io.c: ditto. IO#{codepoints,each_codepoint} fixed as per [ruby-core:23948] * numeric.c: ditto. * range.c: ditto. * string.c: ditto. * struct.c: ditto. * vm_eval.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30* merge some patches from win32-uncode-test branch.usa
see #1685. * file.c, include/ruby/intern.h (rb_str_encode_ospath): new function to convert encoding for pathname. * win32.c, include/ruby/win32.h (rb_w32_ulink, rb_w32_urename, rb_w32_ustati64, rb_w32_uopen, rb_w32_uutime, rb_w32_uchdir, rb_w32_umkdir, rb_w32_urmdir, rb_w32_uunlink): new functions to accept UTF-8 path. * win32/win32.c (rb_w32_opendir, link, rb_w32_stati64, rb_w32_utime, rb_w32_unlink): use WCHAR path internally. * file.c (rb_stat, eaccess, access_internal, rb_file_s_ftype, chmod_internal, rb_file_chmod, rb_file_chown, utime_internal, rb_file_s_link, unlink_internal, rb_file_s_rename): use UTF-8 version functions on Win32. * file.c (apply2files, rb_stat, rb_file_s_lstat, rb_file_symlink_p, rb_file_readable_p, rb_file_writable_p, rb_file_executable_p, check3rdbyte, rb_file_identical_p, rb_file_chmod, rb_file_chown, rb_file_s_link, rb_file_s_symlink, rb_file_s_rename): call rb_str_encode_ospath() before passing the path to system. * io.c (rb_sysopen): ditto. * dir.c (dir_chdir, dir_s_mkdir, dir_s_rmdir): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-09* dir.c (push_glob): clear up the previous commit (RB_GC_GUARD canmame
precede the last reference). [ruby-dev:40942] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-09* dir.c (push_glob): add RB_GC_GUARD to prevent str being free'ed.mame
a patch from Masaya TARUI in [ruby-dev:40939]. [ruby-dev:40514] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-23* dir.c (dir_s_glob): get rid of comment starter.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-23* dir.c (dir_s_glob): add rdoc by Roger Pack. [ruby-core:27669]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12* prelude.rb (require_relative): use File.realpath. [ruby-dev:40040]akr
* include/ruby/intern.h: declare rb_dir_getwd. * dir.c (rb_dir_getwd): copied from dir_s_getwd to export. (dir_s_getwd): use rb_dir_getwd. * file.c (rb_file_s_realpath): new method File.realpath. (rb_file_s_realdirpath): new method File.realdirpath. * lib/pathname.rb (Pathname#realpath): use File.realpath. (Pathname#realdirpath): use File.realdirpath. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-03* dir.c (dir_check): moved other checks from GetDIR.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-03* dir.c (GetDIR): fixed a variable name.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-19* dir.c (GlobPathValue), file.c (rb_get_path_check): path namesnobu
must be ASCII compatible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-18* dir.c (GlobPathValue): adjust return types. based on a patchnobu
from Naohisa Goto at [ruby-dev:39350]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-18* dir.c (GlobPathValue): glob allows null bytes as separators.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-17* dir.c (push_glob): str should be a string always.nobu
* dir.c (rb_push_glob, dir_globs): use #to_path to convert non- string values. cf. [ruby-dev:39345] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09* dir.c (dir_data_type): typed.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-03* dir.c (Init_Dir): alias Dir#path to Dir#to_path. [ruby-core:25326]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-19* dir.c (DEFINE_STRUCT_DIRENT): use union to allocate sufficientmatz
memory space for Solaris. a patch from Naohisa GOTO <ngoto at gen-info.osaka-u.ac.jp> in [ruby-dev:39132]. [ruby-dev:39062] * configure.in (SIZEOF_STRUCT_DIRENT_TOO_SMALL): Solaris dirent check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-18* suppressed shorten-64-to-32 warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-15* dir.c (push_glob): re-fix GC problem.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-15* dir.c (push_glob): fix GC problem.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-22* io.c: remove __CHECKER__ test.akr
* dir.c: ditto. * dln.c: ditto. * file.c: ditto. * process.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-10 * dir.c (dir_s_getwd): directory path's encoding should be filesystem'susa
one. * lib/tmpdir.rb: ditto (but not finished yet.) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-09* dir.c (dir_s_glob): fixed rdoc. a patch from Joseph Pecoraro atnobu
[ruby-core:23767]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-09* dir.c (sys_warning): get rid of type-punning function cast.nobu
* dir.c (ruby_glob0): get rid of possible overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-22 * dir.c (glob_helper): C99(gcc)-ism.usa
* time.c (find_time_t): GUESS macro needs the variable named ``result'' always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-21* dir.c (dir_path, dir_each, glob_helper): use readdir_r() ifnobu
available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-16* node.h (rb_notimplement_body_p): declared.akr
* vm_method.c (Init_eval_method): suppress a warning. * io.c (rb_io_fsync): use rb_f_notimplement if not implemented. (rb_io_close_on_exec_p): ditto. (rb_io_set_close_on_exec): ditto. (rb_io_fcntl): ditto. (rb_f_syscall): ditto. * dir.c (dir_tell): ditto. (dir_seek): ditto. (dir_s_chroot): ditto. * process.c (proc_getpgrp): ditto. (proc_setpgrp): ditto. (proc_getpgid): ditto. (proc_setpgid): ditto. (proc_setsid): ditto. (proc_getpriority): ditto. (proc_setpriority): ditto. (proc_getrlimit): ditto. (proc_setrlimit): ditto. (p_sys_setuid): ditto. (p_sys_setruid): ditto. (p_sys_seteuid): ditto. (p_sys_setreuid): ditto. (p_sys_setresuid): ditto. (p_sys_setgid): ditto. (p_sys_setrgid): ditto. (p_sys_setegid): ditto. (p_sys_setregid): ditto. (p_sys_setreuid): ditto. (p_sys_setresgid): ditto. (p_sys_issetugid): ditto. (proc_getgroups): ditto. (proc_setgroups): ditto. (proc_initgroups): ditto. (proc_daemon): ditto. (rb_proc_times): ditto. * file.c (rb_file_s_lchown): ditto. (rb_file_s_link): ditto. (rb_file_s_symlink): ditto. (rb_file_s_readlink): ditto. (rb_file_s_truncate): ditto. (rb_file_truncate): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-16* dir.c (bracket): fix escape handling for range character in bracketmame
of fnmatch pattern. e.g., '[a\-c]' should not match 'b'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-15* dir.c (fnmatch_helper): use rb_enc_precise_mbclen andnaruse
fail if bytes are invalid. [ruby-dev:38307] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-14* dir.c (bracket): if same in bytes, path is matching.nobu
[ruby-dev:38305] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-12* dir.c (bracket, fnmatch_helper): compare bytewise first, to getnobu
rid of invalid byte sequence. [ruby-dev:38303] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17* dir.c, dln.c, parse.y, re.c, ruby.c, sprintf.c, strftime.c,nobu
string.c, util.c, variable.c: use strlcpy, memcpy and snprintf instead of strcpy, strncpy and sprintf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-11* dir.c (dir_seek): use long for seekdir().nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06* dir.c (dir_read): don't disable rdoc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 * win32/{dir.h, win32.c} (rb_w32_readdir_with_enc): new function tousa
read entry with specified enc. * win32/win32.c (readdir_internal): extract from rb_w32_opendir(). * win32/win32.c (opendir_internal): extract from rb_w32_readdir(). * dir.c (dir_read, dir_each): use new READDIR macro instead of readdir() to pass enc for special version of readdir, such as above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02* dir.c (dir_s_home): new method. [ruby-core:21454]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-25* dir.c (join_path): use strlcat() to force link.nobu
* dir.c (glob_helper): no strcpy() is needed since len is known. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-31* dir.c (dir_globs): need taint check. reported by stevematz
<oksteev at gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18* string.c (rb_external_str_new): a new function to convert frommatz
external encoding to internal encoding. if something went wrong, it returns a string with the external encoding. * string.c (rb_external_str_new_with_enc): same as above besides you can specify the source encoding. * ruby.c (ruby_set_argv): use rb_external_str_new() * ruby.c (set_arg0, ruby_script): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-11* include/ruby/oniguruma.h (OnigCodePoint): unsigned long to unsigned int.naruse
* include/ruby/encoding.h (rb_enc_codepoint): ditto. * encoding.c (rb_enc_codepoint): signed int to unsigned int. * encoding.c (rb_enc_ascget): ditto. * string.c (rb_str_casecmp): ditto. * string.c (enc_succ_alnum_char): ditto. * string.c (rb_str_inspect): ditto. * string.c (rb_str_upcase_bang): ditto. * string.c (rb_str_downcase_bang): ditto. * string.c (rb_str_capitalize_bang): ditto. * string.c (rb_str_swapcase_bang): ditto. * string.c (struct tr): ditto. * string.c (trnext): ditto. * string.c (tr_trans): ditto. * string.c (tr_setup_table): ditto. * string.c (tr_find): ditto. * string.c (rb_str_delete_bang): ditto. * string.c (rb_str_squeeze_bang): ditto. * string.c (rb_str_count): ditto. * string.c (rb_str_split_m): ditto. * string.c (rb_str_each_line): ditto. * string.c (rb_str_lstrip_bang): ditto. * string.c (rb_str_rstrip_bang): ditto. * string.c (rb_str_intern): ditto. * dir.c (char_casecmp): ditto. * sprintf.c (rb_str_format): ditto. * enc/emacs_mule.c (mbc_to_code): to be 32bit clean. * enc/emacs_mule.c (code_to_mbc): ditto. * enc/gb18030.c (mbc_to_code): ditto. * enc/gb18030.c (code_to_mbc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e