1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

33 commits

Author SHA1 Message Date
akr
3144d2a492 * lib/pathname.rb (test_kernel_open): use File.identical?.
[ruby-talk:171804]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-21 05:54:08 +00:00
akr
b5c68b60bd * lib/pathname.rb (Pathname#unlink): try Dir.unlink first to
avoid unlink a directory by root.
  cf. [ruby-dev:26237]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-10 15:17:35 +00:00
akr
7b154a9702 doc fix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-02 17:43:59 +00:00
akr
be2210bbbd * lib/pathname.rb (Pathname#unlink): use SystemCallError instead of
Errno::EISDIR because EISDIR is not portable.
  [ruby-core:5001]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-15 15:32:35 +00:00
akr
21e22f8f96 * lib/pathname.rb (Pathname#unlink): unlink a symlink to a directory
was failed.  [ruby-core:4992]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-15 05:50:45 +00:00
akr
24056dbf4d * lib/pathname.rb (cleanpath_aggressive): make it private.
(cleanpath_conservative): ditto.
  Suggested by Daniel Berger.  [ruby-core:3914]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-12 16:04:31 +00:00
akr
2546a366ed * lib/pathname.rb (Pathname#initialize): fix pathname initialization
by pathname.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-27 12:41:10 +00:00
akr
adc10cab51 test Kernel.open accepts pathname object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-24 11:56:50 +00:00
akr
d53e34bbfa add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-26 16:27:57 +00:00
akr
d449ece238 * lib/pathname.rb: sync taint/freeze flag between
a pathname object and its internal string object.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-23 07:40:50 +00:00
akr
200d669563 * lib/pathname.rb: use assert_raise instead of assert_raises.
* lib/pp.rb: ditto.

* lib/time.rb: ditto.

* lib/tsort.rb: ditto.
  use TSortHash and TSortArray instead of Hash and Array in test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-11 17:36:37 +00:00
gsinclair
f30a0d6199 Backported from CVS HEAD (documentation)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-11 12:28:09 +00:00
akr
b3e5bda89a lib/pathname.rb (PathnameTest#test_plus): add 2 assertions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-26 07:42:35 +00:00
akr
3e67076db0 lib/pathname.rb (Pathname#+): re-implemented to resolve ".." in
beginning of the argument.
(Pathname#join): concatenate from the last argument.
(Pathname#parent): just use Pathname#+.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-21 07:28:59 +00:00
akr
dc9603bd5c * lib/pathname.rb (Pathname#link, Pathname#symlink): obsoleted.
(Pathname#make_link, Pathname#make_symlink): new method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-03 18:51:23 +00:00
akr
40cb49fce8 previous change refined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-28 07:04:52 +00:00
akr
7754869905 * lib/pathname.rb (Pathname#realpath): obsolete the force_absolute
argument.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-28 06:43:51 +00:00
akr
21ef0b6b1c add document that pathname.rb supports only Unix style pathnames.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-25 05:00:06 +00:00
akr
91669219ef (Pathname#parent): if self is .', return ..'.
(Pathname#children): if self is `.', don't prepend self for a
pathname in a result.
(Pathname#join): re-implemented using Pathname#+.
(Pathname#find): if self is `.', remove `./' prefix of yielding
pathname.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-07 14:28:20 +00:00
akr
fb55a6d12f lib/pathname.rb (Pathname#+): if self or the argument is `.', return another.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-07 03:51:15 +00:00
akr
dc592364e6 * lib/pathname.rb (Pathname#+): return the argument if self is `.'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-07 02:08:04 +00:00
akr
a5c350aaba * re.c (rb_reg_s_union, Init_Regexp): new method `Regexp.union'.
* lib/pathname.rb (realpath): examine Dir.pwd because it may have
  symlinks.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-29 08:31:43 +00:00
akr
2768ca8b90 * lib/pathname.rb (foreachline, dir_foreach): add obsolete warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-19 04:14:40 +00:00
akr
839ef7bfbb * lib/pathname.rb (realpath): make ELOOP check bit more robust.
(children): prepend self by default.
  (chroot): obsoleted.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-13 19:46:07 +00:00
akr
6e41de6767 fix previous change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-11 07:12:09 +00:00
akr
31fd8aa681 * lib/pathname.rb (realpath): check existence of the file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-11 07:09:19 +00:00
akr
b01f0cab31 * lib/pathname.rb (realpath): re-implemented.
(realpath_root?, realpath_rec): removed


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-11 06:42:41 +00:00
akr
6fc32eb8bb * lib/pathname.rb (realpath_rec): fix handling of symlink to absolute
path.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-11 05:37:41 +00:00
akr
4fca6e91dc * lib/pathname.rb: version information is added in document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-05 14:31:35 +00:00
akr
94e01ab645 * lib/pathname.rb (initialize): raise ArgumentError if argument has
'\0' character.
  (relative_path_from): new method.
  (each_entry): new method for replacement of dir_foreach.
  (foreach, foreachline, dir_foreach, chdir): obsoleted.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-04 06:04:59 +00:00
akr
f047918d09 * lib/pathname.rb (initialize): duplicate and freeze argument.
(to_s): return duplicated string.
(children): new method.
(each_line): new alias to foreachline.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-03 16:36:24 +00:00
akr
def3aa514a lib/pathname.rb: update document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-18 11:35:38 +00:00
akr
326569b7df * lib/pathname.rb: added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24 04:10:35 +00:00