nobu
aa3b506270
add some documents [ci skip]
...
* bignum.c (Init_Bignum): [DOC] Bignum::GMP_VERSION.
* complex.c (Init_Complex): [DOC] ignore an internal class.
* dir.c (Init_Dir): [DOC] File::FNM_SYSCASE.
* file.c (rb_file_exists_p): [DOC] File.exists? is deprecated.
* object.c (rb_mod_initialize_clone): [DOC] ignore implementation
detail.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-28 11:28:55 +00:00
zzak
1fd840a063
* file.c: [DOC] Clarify how File.file? handles symbolic links. Also
...
cleaned up the rdoc style for this method, more to follow.
Originally reported by Michael Renner [Bug #10067 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-27 20:23:45 +00:00
ktsj
9f051c80dc
* file.c, ext/pathname/pathname.c: [DOC] correct position of method rdoc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-06 12:45:27 +00:00
hsbt
b5a000bf4c
* file.c: [DOC] document File.join returns a string.
...
Contributed by @dapplebeforedawn. [fix GH-646]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-30 02:37:31 +00:00
nobu
e99ee55abc
constify parameters
...
* include/ruby/intern.h: constify `argv` parameters.
* include/ruby/ruby.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-18 06:16:39 +00:00
nobu
e2890123ac
file.c: shrink expanded path
...
* file.c (expand_path): shrink expanded path which no longer needs
rooms to append. [ruby-core:63114] [Bug #9934 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-12 04:09:41 +00:00
nobu
f2980e3e20
encoding.h: constify rb_encoding
...
* include/ruby/encoding.h: constify `rb_encoding` itself, not only
arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-02 20:23:47 +00:00
nobu
046831094b
constify rb_encoding and OnigEncoding
...
* include/ruby/encoding.h: constify `rb_encoding` arguments.
* include/ruby/oniguruma.h: constify `OnigEncoding` arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-01 22:06:11 +00:00
nobu
bfa4f32069
file.c: birthtime on Windows
...
* file.c (stat_birthtime): `ctime` is actually `created time` on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-22 14:34:54 +00:00
naruse
6b4f9210b0
* file.c (stat_birthtime): add birthtime support [Feature #9647 ]
...
* file.c (rb_stat_birthtime): add File::Stat.birthtime
* file.c (rb_file_s_birthtime): add File.birthtime
* file.c (rb_file_birthtime): add File#birthtime
* configure.in: check struct stat.st_birthtimespec.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-22 11:49:22 +00:00
naruse
210f863906
revert File::Statfs [Feature #9772 ]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-22 10:39:48 +00:00
tadf
08e0c31d14
* file.c (rb_f_test): removed meaningless "case 'a'".
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-05 19:38:11 +00:00
ngoto
09f51c56d8
* file.c (HAVE_STRUCT_STATVFS_F_BASETYPE): File::Statfs#fstypename
...
is supported on AIX, HP-UX, and Solaris, by using the value of
struct statvfs.f_basetype.
* configure.in (HAVE_STRUCT_STATVFS_F_BASETYPE): check struct
statvfs.f_basetype which is available on AIX, HP-UX, and Solaris.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-02 15:24:04 +00:00
kazu
a0a5836487
add indent
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-01 13:25:43 +00:00
kazu
2957f88f8f
* file.c: Change AND condition to nested condition.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-01 13:25:40 +00:00
ngoto
793d9c14df
* file.c (FSTATFS): check availability of struct statfs and
...
struct statvfs in addition to fstatfs(2) and fstatvfs(2).
This fixes error in Solaris. [Bug #9788 ] [ruby-dev:48145]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-30 15:38:31 +00:00
kazu
7973883c3a
new macros for statfs_t
...
* file.c (HAVE_STRUCT_STATFS_T_F_FSTYPENAME): Add new macro for
statfs_t.
* file.c (HAVE_STRUCT_STATFS_T_F_TYPE): ditto.
* file.c (rb_io_statfs): check FSTATFS macro only instead of
HAVE_FSTATFS and HAVE_FSTATVFS.
* file.c (statfs_type): use new macro.
* file.c (statfs_fstypename): ditto.
* file.c (statfs_inspect): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-28 19:35:42 +00:00
kazu
c521d87f68
fix preprocessor condition
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-28 19:35:39 +00:00
nobu
1cabc3cab1
file.c: fix typo
...
* file.c (FSTATFS): fix typo and commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-28 14:13:31 +00:00
nobu
a76b0ed54d
file.c: fix errors on Windows
...
* file.c (rb_io_statfs, rb_statfs_init, statfs_inspect): fix
compilation errors on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-28 14:10:28 +00:00
naruse
19fac4432f
* configure.in (HAVE_STRUCT_STATFS_F_TYPE): check struct statfs.f_type
...
to support OpenBSD.
* file.c (statfs_type): use above macro to switch.
* file.c (statfs_inspect): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-28 12:46:23 +00:00
naruse
559d689ca6
* configure.in: check struct statvfs and struct statvfs.f_fstypename.
...
* configure.in: on NetBSD fstatfs is obsoleted.
* file.c: support NetBSD for File::Statfs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-28 09:08:15 +00:00
naruse
f83d51d814
* file.c (statfs_inspect): suppress warnings.
...
assume those values won't be larger than LONG_LONG_MAX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-24 08:46:56 +00:00
nobu
ca258c86cf
file.c: statfs_inspect
...
* file.c (statfs_inspect): add File::Statfs#inspect method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-24 00:35:34 +00:00
naruse
297fe29fa9
* file.c (statfs_fsid): remove statfs.f_fsid because it doesn't return
...
meaningful value portably. http://togetter.com/li/658517
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23 05:25:12 +00:00
nobu
c5fef27312
file.c: unpack in binary
...
* file.c (statfs_fsid): convert with rb_integer_unpack.
* configure.in: fsid_t is no longer used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23 04:31:09 +00:00
nobu
0f69c1845a
file.c: fsid_t may not be defined
...
* configure.in: check if fsid_t is defined.
* file.c (statfs_fsid): fsid_t may not be defined, assume long in
that case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23 02:32:17 +00:00
usa
86dc863bd8
* win32/win32.c, include/ruby/win32.h (ustatfs): implementation of
...
statfs(2) clone. [EXPERIMENTAL]
* file.c (rb_io_statfs): use above function.
* configure.in, win32/Makefile.sub (struct statfs): available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22 15:45:00 +00:00
usa
900ede4053
* file.c (rb_io_stafs): use statfs(2) if fstatfs(2) is unavailable.
...
* configure.in (fstatfs): check it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22 14:57:18 +00:00
nobu
c143b9a0ab
file.c: suppress a warning
...
* file.c (statfs_fsid): use union to suppress strict-aliasing
warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22 14:01:51 +00:00
usa
026b0b9469
* file.c (rb_io_statfs): need to define even if the system doesn't have
...
fstatfs(2).
* test/ruby/test_file.rb (TestFile#test_statfs): skip if IO#stafs is not
implemented.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22 13:19:15 +00:00
naruse
3b1862e62f
define File::Statfs only if HAVE_STRUCT_STATFS
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22 12:57:38 +00:00
naruse
e3a57e06de
fix typo
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22 10:59:38 +00:00
naruse
035a4e7d72
* file.c: newly added a class File::Statfs. (experimental)
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22 10:35:57 +00:00
hsbt
d89b64ddd7
* file.c: [DOC] Add more documentation for File.basename by @avdi [fix GH-550][ci skip]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-28 00:37:16 +00:00
charliesome
e789250325
* file.c (rb_f_test): [DOC] refer to 'character' instead of 'integer'
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-01 11:08:15 +00:00
marcandre
e030b4ee79
* array.c: rdoc clarification for <=>
...
* file.c: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09 17:33:47 +00:00
nobu
64211a0f98
file.c: to_uid and to_gid
...
* file.c (to_uid, to_gid): extract from rb_file_s_chown,
rb_file_chown, and rb_file_s_lchown.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 01:40:53 +00:00
nobu
4db0887d67
file.c: proper types
...
* file.c (rb_file_chown): use proper configured types, not plain
int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 00:47:26 +00:00
nobu
9f368b5ac9
file.c: destination path only
...
* file.c: remove unnecessary the source path from EEXIST error
messages and show the destination path only. [ruby-core:59202]
[Feature #9263 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21 04:00:31 +00:00
nobu
079009fb93
file.c: fix buffer overflow
...
* file.c (rb_readlink): fix buffer overflow on a long symlink. since
rb_str_modify_expand() expands from its length but not its capacity,
need to set the length properly for each expansion.
[ruby-core:58592] [Bug #9157 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 07:30:37 +00:00
nobu
7ddf295a4b
file.c: remove unnecessary declaration
...
* file.c (GetLastError): already defined in windows.h on nowadays
cygwin, and caused the confliction with the system provided
definition on cygwin64. by @kou1okada [Fixes GH-433].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-08 15:26:55 +00:00
ko1
c5e08b764e
* add RUBY_TYPED_FREE_IMMEDIATELY to data types which only use
...
safe functions during garbage collection such as xfree().
On default, T_DATA objects are freed at same points as fianlizers.
This approach protects issues such as reported by [ruby-dev:35578].
However, freeing T_DATA objects immediately helps heap usage.
Most of T_DATA (in other words, most of dfree functions) are safe.
However, we turned off RUBY_TYPED_FREE_IMMEDIATELY by default
for safety.
* cont.c: ditto.
* dir.c: ditto.
* encoding.c: ditto.
* enumerator.c: ditto.
* error.c: ditto.
* file.c: ditto.
* gc.c: ditto.
* io.c: ditto.
* iseq.c: ditto.
* marshal.c: ditto.
* parse.y: ditto.
* proc.c: ditto.
* process.c: ditto.
* random.c: ditto.
* thread.c: ditto.
* time.c: ditto.
* transcode.c: ditto.
* variable.c: ditto.
* vm.c: ditto.
* vm_backtrace.c: ditto.
* vm_trace.c: ditto.
* ext/bigdecimal/bigdecimal.c: ditto.
* ext/objspace/objspace.c: ditto.
* ext/stringio/stringio.c: ditto.
* ext/strscan/strscan.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 11:16:54 +00:00
zzak
2bd5ab359d
* file.c: [DOC] fix rdoc format of File#expand_path from r43386
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-23 02:44:06 +00:00
eregon
5b91ab1f2e
* file.c (File#expand_path): [DOC] improve documentation of File#expand_path.
...
Based on patch by Prathamesh Sonpatki. [ruby-core:57734] [Bug #9002 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-22 07:59:23 +00:00
nobu
22a961383a
dir.c: warn Dir.exists?
...
* dir.c (rb_dir_exists_p): warn deprecated name. [Bug #9041 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-21 17:06:31 +00:00
nobu
1ca90beaac
* file.c (rb_file_exists_p): maybe FileTest.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-21 15:34:55 +00:00
nobu
058d55ad2c
file.c: warn File.exists?
...
* file.c (rb_file_exists_p): warn deprecated name. [Bug #9041 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-21 15:06:59 +00:00
nobu
eeb3156eca
encoding.c: defer code page table
...
* encoding.c (rb_locale_encindex): defer initialization of win32 code
page table until encoding db loaded.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-19 10:55:39 +00:00
nobu
c07c33b28a
file.c: export rb_stat_new
...
* file.c (stat_new_0): constify.
* file.c (rb_stat_new): constify and export. based on a patch by
Hanmac (Hans Mackowiak) at [ruby-core:53225]. [Feature #8050 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-01 11:54:53 +00:00