kosaki
20ae79b0c2
* include/ruby/defines.h: remove NextStep, OpenStep, Rhapsody
...
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-26 00:19:03 +00:00
ayumin
35551be602
* dir.c: Two small documentation fixes. [Bug #5302 ]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-10 04:43:12 +00:00
marcandre
1f2478a7e6
* dir.c: Make RDoc more precise about order of Dir.glob
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-27 23:38:31 +00:00
akr
e7996eb3cc
* internal.h: declare internal functions here.
...
* 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-06-17 22:43:38 +00:00
usa
22d5cf9226
* win32/{win32.c,dir.h} (rb_w32_uopendir): new API to pass UTF-8 path.
...
* 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-04-28 07:22:18 +00:00
akr
6ac9fea36f
update doc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-13 11:58:20 +00:00
akr
fad7d95a18
* dir.c: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-08 11:38:29 +00:00
nobu
125b4b7020
* dir.c (dir_initialize): remove useless intermediate variable.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-21 14:47:13 +00:00
nobu
89130aa8e1
* dir.c (bracket): get rid of scanning at the end of the pattern
...
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-20 14:23:16 +00:00
knu
82abe79b9f
* class.c (rb_scan_args): Add support for optional keyword
...
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-09-10 07:51:58 +00:00
nobu
8d92ac23d1
* dir.c (sys_warning_1): show error message.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-08 21:53:02 +00:00
nobu
36992251c3
* dir.c (glob_make_pattern): fold continuous PLAINs to get rid of
...
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-08-05 07:57:26 +00:00
naruse
7175a9073e
* class.c, compile.c, dir.c, file.c, iseq.c, parse.y, random.c:
...
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-27 07:13:43 +00:00
nobu
25b9eb5e57
* include/ruby/ruby.h (rb_data_type_t): restructured. [ruby-dev:41862]
...
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-07-18 07:31:54 +00:00
drbrain
79aac05474
Clarification of what '*' matches. Patch by John Wells <john.wells at greatworx.com>
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-04 21:22:47 +00:00
marcandre
7729de4d91
* array.c: Documentation: change => in call-seq to ->.
...
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-17 21:07:33 +00:00
marcandre
4afa9ed041
* array.c: Harmonize documentation, in particular regarding:
...
- 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-05-13 05:49:55 +00:00
usa
6c28f99d88
* merge some patches from win32-uncode-test branch.
...
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-30 17:56:23 +00:00
mame
1f2def7dd8
* dir.c (push_glob): clear up the previous commit (RB_GC_GUARD can
...
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 11:32:52 +00:00
mame
5dd8daaa27
* dir.c (push_glob): add RB_GC_GUARD to prevent str being free'ed.
...
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-04-09 11:08:06 +00:00
nobu
cb9da52cde
* dir.c (dir_s_glob): get rid of comment starter.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-23 20:47:23 +00:00
naruse
155e42c50e
* dir.c (dir_s_glob): add rdoc by Roger Pack. [ruby-core:27669]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-23 14:28:38 +00:00
akr
853dd6cabe
* prelude.rb (require_relative): use File.realpath. [ruby-dev:40040]
...
* 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
2010-01-12 00:32:22 +00:00
nobu
252168ed1b
* dir.c (dir_check): moved other checks from GetDIR.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-03 23:26:02 +00:00
nobu
22ec8c664a
* dir.c (GetDIR): fixed a variable name.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-03 23:21:02 +00:00
nobu
a1485dbea0
* dir.c (GlobPathValue), file.c (rb_get_path_check): path names
...
must be ASCII compatible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-19 08:33:01 +00:00
nobu
06e52ba57b
* dir.c (GlobPathValue): adjust return types. based on a patch
...
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 14:59:29 +00:00
nobu
6200f424a7
* dir.c (GlobPathValue): glob allows null bytes as separators.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-18 07:06:29 +00:00
nobu
12fc299a84
* dir.c (push_glob): str should be a string always.
...
* 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-17 21:47:14 +00:00
nobu
44110c88e7
* dir.c (dir_data_type): typed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 02:28:21 +00:00
matz
7a426e029a
* dir.c (Init_Dir): alias Dir#path to Dir#to_path. [ruby-core:25326]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-03 23:07:13 +00:00
matz
529f149bfe
* dir.c (DEFINE_STRUCT_DIRENT): use union to allocate sufficient
...
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-08-19 16:10:06 +00:00
nobu
e07cb859cc
* suppressed shorten-64-to-32 warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-18 08:05:32 +00:00
ko1
0e03a296e6
* dir.c (push_glob): re-fix GC problem.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-15 23:57:33 +00:00
ko1
d3cbda6e8d
* dir.c (push_glob): fix GC problem.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-15 14:46:44 +00:00
akr
fc64028291
* io.c: remove __CHECKER__ test.
...
* 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-22 12:23:06 +00:00
usa
a610b0a959
* dir.c (dir_s_getwd): directory path's encoding should be filesystem's
...
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-10 09:15:55 +00:00
nobu
d1dd871707
* dir.c (dir_s_glob): fixed rdoc. a patch from Joseph Pecoraro at
...
[ruby-core:23767].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-09 06:13:16 +00:00
nobu
11fd9224f7
* dir.c (sys_warning): get rid of type-punning function cast.
...
* 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-06-09 06:11:10 +00:00
usa
8da932fe46
* dir.c (glob_helper): C99(gcc)-ism.
...
* 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-22 01:40:09 +00:00
nobu
143846ad36
* dir.c (dir_path, dir_each, glob_helper): use readdir_r() if
...
available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-21 00:25:43 +00:00
akr
8e8ae2a9c5
* node.h (rb_notimplement_body_p): declared.
...
* 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 16:58:06 +00:00
mame
1b71f8f816
* dir.c (bracket): fix escape handling for range character in bracket
...
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-16 15:48:25 +00:00
naruse
31c1883a54
* dir.c (fnmatch_helper): use rb_enc_precise_mbclen and
...
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-15 03:00:31 +00:00
nobu
205c4b490c
* dir.c (bracket): if same in bytes, path is matching.
...
[ruby-dev:38305]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-14 09:11:29 +00:00
nobu
207becd942
* dir.c (bracket, fnmatch_helper): compare bytewise first, to get
...
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-04-12 10:54:59 +00:00
nobu
22cde7b682
* dir.c, dln.c, parse.y, re.c, ruby.c, sprintf.c, strftime.c,
...
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-17 01:29:17 +00:00
nobu
fd0a91b5ab
* dir.c (dir_seek): use long for seekdir().
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-11 16:18:10 +00:00
akr
0c0f987376
* dir.c (dir_read): don't disable rdoc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 19:04:44 +00:00
usa
6343c99a2e
* win32/{dir.h, win32.c} (rb_w32_readdir_with_enc): new function to
...
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-06 08:23:00 +00:00