summaryrefslogtreecommitdiff
path: root/dir.c
AgeCommit message (Collapse)Author
2013-03-15file.c: rb_sys_fail_path_with_funcnobu
* file.c (rb_sys_fail_path_with_func): share same function, and path may be nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-23dir.c: encoding checknobu
* dir.c (file_s_fnmatch, fnmatch_brace): encoding-incompatible pattern and string do not match, instead of exception. [ruby-dev:47069] [Bug #7911] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21* win32/{dir.h,win32.c} (rb_w32_readdir): removed old rb_w32_readdir()usa
and renamed from rb_w32_readdir_with_enc(). [ruby-core:24864] [Feature #1927] * dir.c (READDIR): follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-01dir.c: use NAMLENnobu
* dir.c (glob_helper): use NAMLEN() to tell the length of d_name instead of strlen(), which can access beyond the boundary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-04dir.c: FNM_EXTGLOBnobu
* dir.c (file_s_fnmatch): match with expanding braces if FNM_EXTGLOB is set. [ruby-core:40037] [Feature #5422] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03* dir.c (Dir#glob):zzak
Documentation for pattern section, backslash subsection Patch by Eric Bouchut [ruby-core#48528] [Bug #7230] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-05dir.c: fix recursionnobu
* dir.c (glob_make_pattern): names under recursive need to be single basenames to match for each name. [ruby-core:47418] [Bug #6977] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-05dir.c: not recurse dot filesnobu
* dir.c (glob_helper): skip dot files early on recursive match. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-05dir.c: enumm answernobu
* dir.c (enumm answer): remap NO and YES to false and true, respectively. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-19* dir.c (dir_initialize): get rid of "unused return: argc = rb_scan_args()"kosaki
warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-17documentation for Dir.exist?nobu
* dir.c (rb_file_directory_p): move documentation for Dir.exist? from file.c so that the proper description will be shown instead of the documentation of File.directory?. [ruby-core:45685] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-17Imports Ruby's port to NativeClient (a.k.a NaCl).yugui
Patch by Google Inc. [ruby-core:45073]. * configure.in (RUBY_NACL): New M4 func to configure variables for NaCl. (RUBY_NACL_CHECK_PEPPER_TYPES): New M4 func to check the old names of Pepper interface types. (BTESTRUBY): New variable to specify which ruby should be run on "make btest". NaCl can run the built binary by sel_ldr, but it need rbconfig.rb. So this variable is distinguished from $MINIRUBY. * thread_pthread.c: Disabled some features on NaCl. * io.c: ditto. * process.c: ditto. * signal.c: ditto. * file.c: ditto. * missing/flock.c: ditto. * nacl/pepper_main.c: An example implementation of Pepper application that embeds Ruby. * nacl/example.html: An example of web page that uses the Pepper application. * nacl/nacl-config.rb: Detects variants of NaCl SDK. * nacl/GNUmakefile.in: Makefile template for NaCl specific build process. * nacl/package.rb: script for packaging a NaCl-Ruby embedding application. * nacl/reate_nmf.rb: Wrapper script of create_nmf.py * dln.c (dln_load): Added a hack to call on NaCl. * util.c (ruby_getcwd): Path to the current directort is not available on NaCl. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-15* reduce UNREACHABLE.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14* variable.c (trace_ev): Removed "not reached" comment as this line isdrbrain
reached. * variable.c (rb_obj_remove_instance_variable): Replaced "not reached" comment with the UNREACHABLE macro. * variable.c (rb_mod_const_missing): ditto. * variable.c (rb_mod_remove_cvar): ditto. * enum.c (first_i): ditto. * string.c (rb_str_aref): ditto. * string.c (str_byte_aref): ditto. * string.c (rb_to_id): ditto. * io.c (rb_io_fmode_modestr): ditto. * io.c (rb_io_oflags_modestr): ditto. * pack.c (num2i32): ditto. * vm_eval.c (rb_method_missing): ditto. * vm_eval.c (rb_f_throw): ditto. * dir.c (dir_read): ditto. * win32/win32.c (child_result): ditto. * struct.c (rb_struct_getmember): ditto. * struct.c (rb_struct_set): ditto. * struct.c (rb_struct_aref_id): ditto. * eval.c (rb_f_raise): ditto. * process.c (rb_f_exit_bang): ditto. * process.c (rb_f_exit): ditto. * process.c (rb_f_abort): ditto. * ext/-test-/iter/break.c (iter_break_value): ditto. * ext/pty/pty.c (pty_check): ditto. * ext/openssl/ossl_pkey.c (ossl_pkey_new): ditto. * ext/readline/readline.c (rb_remove_history): ditto. * ext/stringio/stringio.c (strio_unimpl): ditto. * numeric.c (num_sadded): ditto. * numeric.c (num_init_copy): ditto. * numeric.c (rb_num2ll): ditto. * numeric.c (rb_num2ull): ditto. * vm_insnhelper.c (call_cfunc): ditto. * ruby.c (opt_W_getter): ditto. * bignum.c (rb_big_coerce): ditto. * file.c (rb_f_test): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-24* dir.c (dir_inspect), io.c (rb_io_inspect): keep encoding of path.nobu
[Bug #6072] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-24* dir.c (dir_initialize): keep path in original encoding.nobu
* error.c (syserr_initialize): prefer the encoding of message over locale. [ruby-dev:45279][Bug #6071] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-24* dir.c, file.c, io.c (rb_sys_fail_path): use rb_sys_fail_str.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-24* dir.c, file.c, io.c: use rb_sys_fail_path.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10* dir.c (fnmatch): The * needs to be escaped to avoid formatting innaruse
fnmatch comment. patched by @dalton. https://github.com/ruby/ruby/pull/91 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-25* file.c (rb_enc_path_next, rb_enc_path_skip_prefix)nobu
(rb_enc_path_last_separator, rb_enc_path_end) (ruby_enc_find_basename, ruby_enc_find_extname): encoding-aware path handling functions. * file.c (rb_home_dir, file_expand_path, rb_realpath_internal) (rb_file_s_basename, rb_file_dirname, rb_file_s_extname) (rb_file_join): should respect the encodings of arguments than file system encoding. [ruby-dev:45145] [Bug #5919] * dir.c (check_dirname, ruby_glob0): ditto. * ext/pathname/pathname.c (path_sub_ext): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-21* dir.c (dir_chdir, check_dirname): get rid of optimization-out.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05* bignum.c (big_rshift), compile.c (validate_label,nobu
iseq_build_from_ary_exception), cont.c (cont_capture), dir.c (dir_open_dir), gc.c (objspace_each_objects), io.c (pipe_open) (rb_io_advise), parse.y (parser_compile_string) (rb_parser_compile_file), proc.c (binding_free), process.c (rb_proc_exec_n, rb_seteuid_core, proc_setegid, rb_setegid_core) (p_uid_exchange, p_gid_exchange), regparse.c (strdup_with_null), signal.c (sig_dfl), vm.c (rb_iseq_eval, rb_iseq_eval_main), vm_insnhelper.c (vm_expandarray): suppress unused-but-set-variable warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-26* include/ruby/defines.h: remove NextStep, OpenStep, Rhapsodykosaki
support. Last activity of their OSs are 7 years ago. * configure.in: ditto. * dir.c: ditto. * ext/tk/extconf.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-10* dir.c: Two small documentation fixes. [Bug #5302]ayumin
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-27* dir.c: Make RDoc more precise about order of Dir.globmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17* internal.h: declare internal functions here.akr
* node.h: declare NODE dependent internal functions here. * iseq.h: declare rb_iseq_t dependent internal functions here. * vm_core.h: declare rb_thread_t dependent internal functions here. * bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c, enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c, iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y, proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c, thread.c, time.c, transcode.c, variable.c, vm.c, tool/compile_prelude.rb: don't declare internal functions declared in above headers. include above headers if required. Note that rb_thread_mark() was declared as void rb_thread_mark(rb_thread_t *th) in cont.c but defined as void rb_thread_mark(void *ptr) in vm.c. Now it is declared as the later in internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-28* win32/{win32.c,dir.h} (rb_w32_uopendir): new API to pass UTF-8 path.usa
* win32/win32.c (opendir_internal, rb_w32_opendir): extract and merge common part of rb_w32_opendir() and rb_w32_uopendir(). * dir.c (do_opendir, glob_helper): encoding. * dir.c (dir_initialize, do_opendir): convert path to UTF-8 and call rb_w32_uopendir() instead of rb_w32_opendir() on Windows. fixes #4491, reported by Joey Zhou. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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