yugui
e3b9424dfa
* io.c (argf_inplace_mode_set): prohibits an assignment
...
of a tainted value. Patch by unak.
* util.c, file.c: prevents a buffer over-run on windows.
Patch by unak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@28522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-02 10:14:05 +00:00
yugui
82c6f54b16
merges r25290 from trunk into ruby_1_9_1.
...
--
* file.c (path_check_0): prevent from GC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:45:40 +00:00
yugui
35d07e3fe8
merges r25092 from trunk into ruby_1_9_1.
...
--
* win32/win32.c, include/ruby/win32.h (rb_w32_access): new function to
replace MSVCRT's access().
[ruby-core:25761]
* file.c (eaccess): workaround for recent MSVCRT is no longer needed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-05 09:40:41 +00:00
yugui
cb3df565d7
merges r23989 from trunk into ruby_1_9_1.
...
--
* file.c (rb_file_s_basename): returns new string instead of
shared string from FilePathStringValue(). [ruby-core:24199]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-13 06:13:38 +00:00
yugui
427da29757
merges r23889 from trunk into ruby_1_9_1.
...
--
* file.c (file_expand_path): should copy original encoding.
[ruby-dev:38612]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-12 14:44:37 +00:00
yugui
2a60fec336
merges r23729 from trunk into ruby_1_9_1.
...
--
* file.c (file_expand_path): drive letter is ascii only.
[ruby-dev:38612]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-21 10:34:31 +00:00
yugui
ff97db81d1
merges r23670 from trunk into ruby_1_9_1.
...
--
* file.c (file_expand_path): associate the input encoding when
copying an absolute path. [ruby-dev:38594]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-21 09:14:39 +00:00
yugui
5784b10307
merges r23607 from trunk into ruby_1_9_1.
...
--
* file.c (istrailinggarbage): fixed typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-20 09:07:43 +00:00
yugui
12d0248c7d
merges r22707 from trunk into ruby_1_9_1.
...
--
* file.c: include fcntl.h for O_RDONLY on Solaris.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-04 09:21:20 +00:00
yugui
079741af1b
merges r22655,r22658,r22660 and r22661 from trunk into ruby_1_9_1.
...
--
* file.c (file_load_ok): checks if regular file, except for the
platform disallows to open directories, e.g. cygwin.
[ruby-dev:38097], [Bug #1221 ]
--
* file.c (file_load_ok): cygwin allows to open directories.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-04 09:19:31 +00:00
yugui
c19edf674b
merges r22393 from trunk into ruby_1_9_1.
...
* file.c (rb_file_s_extname): fix for spaces before extention.
[ruby-dev:38044]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 14:05:06 +00:00
yugui
abc40f03ef
merges r21917, r21955 and r21974 from trunk into ruby_1_9_1.
...
* load.c (rb_require_safe): raises when the path to be loaded is
tainted. [ruby-dev:37843]
---
* file.c (rb_find_file_ext): should not be infected from other
load paths.
---
* adds a test case for r21955 and r21917.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 04:30:22 +00:00
yugui
afd394ab43
merges r21331 from trunk into ruby_1_9_1.
...
* file.c (rb_file_s_stat): need type check for non string values.
[ruby-dev:37673] fix : #964
* file.c (rb_file_s_size, rb_file_s_atime, rb_file_s_mtime,
rb_file_s_ctime, rb_f_test): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-09 02:18:06 +00:00
yugui
d2cd7f72db
merges r20304 from trunk into ruby_1_9_1.
...
* file.c (rb_file_world_writable_p): should return nil for non
world-writable files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-22 14:53:06 +00:00
yugui
642e081879
* dln.c: Ruby no longer supports MacOS 9 or before.
...
* eval.c: ditto.
* eval_intern.h: ditto.
* ext/extmk.rb: ditto.
* ext/tk/sample/tkextlib/treectrl/demo.rb: ditto.
* ext/tk/stubs.c: ditto.
* file.c: ditto.
* hash.c: ditto.
* include/ruby/defines.h: ditto.
* ruby.c: ditto.
* signal.c: ditto.
* vm_core.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:42:00 +00:00
yugui
8dd118c0db
* djgpp/GNUmakefile.in: removed. Ruby no longer supports djgpp.
...
* djgpp/README.djgpp: ditto.
* djgpp/config.hin: ditto.
* djgpp/config.sed: ditto.
* djgpp/configure.bat: ditto.
* djgpp/mkver.sed: ditto.
* ext/Setup.dj: ditto.
* dln.c: removed djgpp supports.
* file.c: ditto.
* gc.c: ditto.
* io.c: ditto.
* process.c: ditto.
* ruby.c: ditto.
* signal.c: ditto.
* util.c: ditto.
* vm_core.h: ditto.
* lib/fileutils.rb: ditto.
* lib/mkmf.rb: ditto.
* ext/socket/socket.c: ditto.
* test/fileutils/test_fileutils.rb: ditto.
* test/ruby/test_env.rb: ditto.
* test/ruby/test_path.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:25:12 +00:00
nobu
605a46dd05
* file.c (rb_file_s_extname): preceding dots are not a part of
...
extension.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-26 19:28:44 +00:00
nobu
9320b5c65f
* file.c (rmext): preceding dots are not a part of extension.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-26 18:57:23 +00:00
akr
a0d163da71
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07 08:02:21 +00:00
matz
0771b987a4
* file.c (file_expand_path): applied a patch from Nobuhiro Tachino
...
in [ruby-dev:35948]. fix #491
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:15:18 +00:00
akr
b94060024d
* file.c (rb_find_file): fix GC problem on Debian GNU/Linux (IA64)
...
with gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21).
There is no register/memory to contain load_path. A register (r35)
contains &RARRAY_PTR(load_path), (char*)load_path + 32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-04 00:05:30 +00:00
ko1
204929af9d
* include/ruby/signal.h: removed.
...
* common.mk, class.c, eval.c, eval_intern.h, file.c, gc.c, hash.c,
io.c, process.c, signal.c: vm_core.h: ditto.
Some unused external global variables are also removed.
(rb_prohibit_interrupt, rb_trap_immediate, rb_trap_pending,
rb_thread_critical)
* ext/openssl/ossl_ssl.c, ext/openssl/ossl_x509store.c,
ext/readline/readline.c, ext/socket/depend,
ext/socket/socket.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03 08:00:05 +00:00
ko1
ca6a8b1e2c
* include/ruby/intern.h: rename RB_UBF_DFL to
...
RUBY_UBF_IO and RUBY_UBF_PROCESS.
Because there is no default (universal) unblocking function.
* ext/socket/socket.c, file.c, io.c, process.c, thread.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31 07:44:24 +00:00
nobu
24aba08054
* include/ruby/intern.h (rb_file_s_absolute_path),
...
(rb_file_absolute_path): prototyped.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-29 23:59:32 +00:00
mame
2fcd15d45d
* file.c (file_expand_path): check invalid access.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-28 15:03:38 +00:00
matz
d68321c18e
* file.c (rb_file_s_expand_path): new class method for class File.
...
* file.c (file_expand_path): add absolute_path handling (no ~user
expansion). [ruby-core:18319]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-28 03:51:22 +00:00
akr
895fd7ec5e
* include/ruby/io.h (rb_io_t): remove path field and add pathv field.
...
(MakeOpenFile): initialize pathv as Qnil.
* gc.c: mark pathv field in T_FILE.
* io.c: follow the rb_io_t field change.
* file.c: ditto.
* ext/socket/socket.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-23 00:47:54 +00:00
akr
cefd28a84f
* file.c (rb_stat_inspect): don't raise if self is not initialized.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-21 10:20:55 +00:00
nobu
f1ff09fbf6
* array.c (rb_ary_sort_bang): reset to real class.
...
* file.c (rb_find_file_ext, rb_find_file): ditto.
* io.c (io_reopen): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-05 20:08:33 +00:00
nobu
9a7def6ea9
* file.c (rb_stat_mode): generalized st_mode mask.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-05 05:19:45 +00:00
nobu
e7d2f303b7
* file.c (rb_find_file_ext, rb_find_file): converts Windows style path
...
to Cygwin path. [ruby-dev:35647]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-28 20:38:04 +00:00
nobu
31aa0986b8
* file.c (rb_find_file_ext, rb_find_file): not to split load path with
...
path separator. [ruby-Bugs-21356]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-28 09:15:48 +00:00
nobu
d81ffff0e8
* file.c (rb_find_file_ext, rb_find_file): converts Windows style path
...
to Cygwin path. [ruby-dev:35647]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-24 15:10:31 +00:00
nobu
0acca9a826
* compile.c (insn_data_to_s_detail), file.c (rb_stat_inspect),
...
iseq.c (ruby_iseq_disasm_insn, ruby_iseq_disasm),
process.c (pst_message), re.c (match_inspect): use rb_str_catf.
* dir.c (dir_inspect), iseq.c (iseq_inspect, insn_operand_intern): use
rb_sprintf.
* error.c (rb_name_error, rb_raise, rb_loaderror, rb_fatal): use
rb_vsprintf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22 08:53:34 +00:00
nobu
4b843da869
* file.c (rb_file_s_extname): fix for file name with spaces.
...
[ruby-talk:307404]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-06 16:24:45 +00:00
nobu
1df1cb307e
* file.c (file_expand_path): no need to expand root path which has no
...
short file name. [ruby-dev:35095]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-14 07:56:06 +00:00
nobu
5a647a3f5f
* include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.
...
* *.c: no cache in init functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09 09:25:32 +00:00
ko1
72ba13aa8e
* array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,
...
enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c,
io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c,
string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c,
vm.c, gc.c:
allocated memory objects by xmalloc (ruby_xmalloc) should be
freed by xfree (ruby_xfree).
* ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c,
ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c,
ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c,
ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c,
ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c:
ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08 10:01:40 +00:00
nobu
552d3a5bcc
* file.c (file_expand_path): fix for non-existent files and SFN of
...
symlinks. [ruby-talk:303736]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-03 07:06:23 +00:00
nobu
7c5e3348f7
* suppress warnings on cygwin, mingw and mswin.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-01 19:55:25 +00:00
usa
ea16f7dfc9
* file.c (BUFCHECK): wrong condition. [ruby-core:16921]
...
* file.c (file_expand_buf): shouldn't use buflen for length of string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-27 03:07:55 +00:00
nobu
c3b10e7fcb
* file.c (BUFCHECK): no resize if enough room.
...
* file.c (file_expand_path): use BUFCHECK.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-26 09:24:56 +00:00
usa
224efac340
* file.c (file_expand_path): add more space for '/'.
...
* file.c (file_expand_path): should reset address of p after calling
rb_str_resize(). [ruby-dev:34800]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-26 08:25:44 +00:00
usa
3ecb126e92
* file.c (ntfs_tail): filename which starts with '.' is valid.
...
* file.c (file_expand_path): cygwin symlink support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-26 07:45:49 +00:00
nobu
04351d9558
* file.c (file_expand_path): fix for short file name on Cygwin.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-17 14:54:07 +00:00
nobu
34c96140f3
* file.c (rb_file_s_extname): first dot is not an extension name.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-17 02:29:13 +00:00
nobu
22361a3d1c
* file.c (file_expand_path): support for alternative data stream
...
and ignored trailing garbages of NTFS.
* file.c (rb_file_s_basename): ditto.
* file.c (rb_file_s_extname): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-15 06:34:02 +00:00
akr
b938618359
* file.c (rb_find_file_ext): guard load_path from GC.
...
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) optimizes
load_path by holding only RARRAY_LEN(load_path) and
RARRAY_PTR(load_path) in registers on IA64 GNU/Linux Etch.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08 07:46:30 +00:00
nobu
4264ca9436
* dln.c (dln_find_exe_r, dln_find_file_r): reentrant versions.
...
* file.c (rb_find_file_ext, rb_find_file), process.c (proc_exec_v),
(rb_proc_exec, proc_spawn_v, proc_spawn), ruby.c (process_options):
use reentrant versions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07 21:43:54 +00:00
nobu
01b773a093
* load.c (rb_load_path), vm_core.h (rb_vm_t): moved to VM.
...
* load.c (rb_get_load_path): returns absolute load path.
* load.c (load_path_getter): $LOAD_PATH getter.
* file.c (rb_find_file_ext, rb_find_file), ruby.c (push_include,
ruby_init_loadpath): use the accessor.
* vm.c (rb_vm_mark): mark load_path.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-30 09:03:03 +00:00