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
usa
915b5c5508
* file.c (eaccess): workaround for recent msvcrt's behavior.
...
[ruby-core:16460]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 00:58:04 +00:00
nobu
5e433ffc6c
* file.c (file_expand_path): constified.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 06:19:28 +00:00
matz
755a86b87a
* file.c (SET_EXTERNAL_ENCODING): avoid call rb_enc_check() on
...
half-baked result string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14 13:45:26 +00:00
nobu
0ae6c7f816
* file.c (file_expand_path): set external encoding.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-11 18:13:40 +00:00
nobu
23bb4d7898
* file.c (rb_file_s_basename, rb_file_s_dirname, rb_file_s_extname):
...
copy encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-11 18:12:18 +00:00
nobu
31b604a3f3
* file.c (isdirsep): backslash is valid path separator on cygwin too.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-08 09:51:00 +00:00
nobu
12551ae573
* file.c (rb_file_flock): returns false on EAGAIN if non-blocking.
...
[ruby-core:15795]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05 08:53:08 +00:00
nobu
5848032ce5
* file.c (rb_file_flock): immediately returns on EAGAIN if
...
non-blocking. [ruby-core:15672]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-28 02:43:59 +00:00
nobu
4804658649
* configure.in (ftruncate): check if available.
...
* file.c (rb_file_truncate): check if ftruncate instead of truncate.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-14 17:42:27 +00:00
nobu
3a9bf2f124
* file.c (rb_file_s_utime): inhibits with secure level 2 or higher.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-14 07:02:54 +00:00
naruse
998113d62f
* file.c (lchmod_internal): fix warning cast from pointer to integer of
...
different size.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-08 16:10:27 +00:00
naruse
42dcda08ae
* string.c (rb_str_usascii_new{,2}: defined.
...
(rb_str_new): set US-ASCII and ENC_CODERANGE_7BIT when empty
string.
* encoding.c (rb_usascii_encoding, rb_usascii_encindex): defined.
(rb_enc_inspect, enc_name, rb_locale_charmap, rb_enc_name_list_i):
use rb_str_ascii_new.
* array.c (recursive_join, inspect_ary): ditto.
* object.c (nil_to_s, nil_inspect, true_to_s, false_to_s,
rb_mod_to_s): ditto.
* hash.c (inspect_hash, rb_hash_inspect, rb_f_getenv, env_fetch,
env_clear, env_to_s, env_inspect): ditto.
* numeric.c (flo_to_s, int_chr, rb_fix2str): ditto.
* bignum.c (rb_big2str): ditto.
* file.c (rb_file_ftype, rb_file_s_dirname, rb_file_s_extname,
file_inspect_join, Init_file): ditto.
* test/ruby/test_ruby_m17n.rb: add checks for encoding of string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 16:40:02 +00:00
nobu
2402ecabb0
* file.c (sys_fail2): get rid of unlimited alloca.
...
* io.c (mode_enc, pipe_open, rb_io_s_popen): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-16 05:55:22 +00:00
akr
6cdef2dc7e
* $Date$ keyword removed to avoid inclusion of locale dependent
...
string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06 15:49:38 +00:00
akr
041e829127
* include/ruby/encoding.h (rb_isascii): defined.
...
(rb_isalnum): ditto.
(rb_isalpha): ditto.
(rb_isblank): ditto.
(rb_iscntrl): ditto.
(rb_isdigit): ditto.
(rb_isgraph): ditto.
(rb_islower): ditto.
(rb_isprint): ditto.
(rb_ispunct): ditto.
(rb_isspace): ditto.
(rb_isupper): ditto.
(rb_isxdigit): ditto.
(rb_tolower): ditto.
(rb_toupper): ditto.
* include/ruby/st.h (st_strcasecmp): declared.
(st_strncasecmp): ditto.
* st.c (type_strcasehash): use st_strcasecmp instead of strcasecmp.
(st_strcasecmp): defined.
(st_strncasecmp): ditto.
* include/ruby/ruby.h: include include/ruby/encoding.h.
(ISASCII): use rb_isascii.
(ISPRINT): use rb_isprint.
(ISSPACE): use rb_isspace.
(ISUPPER): use rb_isupper.
(ISLOWER): use rb_islower.
(ISALNUM): use rb_isalnum.
(ISALPHA): use rb_isalpha.
(ISDIGIT): use rb_isdigit.
(ISXDIGIT): use rb_isxdigit.
(TOUPPER): defined.
(TOLOWER): ditto.
(STRCASECMP): ditto.
(STRNCASECMP): ditto.
* dir.c, encoding.c, file.c, hash.c, process.c, ruby.c, time.c,
transcode.c, ext/readline/readline.c: use locale insensitive
functions. [ruby-core:14662]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-01 12:24:04 +00:00
matz
bda85cb021
* file.c (Init_File): File.exists? revived.
...
* dir.c (Init_Dir): Dir.exists? again.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21 03:34:26 +00:00