aboutsummaryrefslogtreecommitdiffstats
path: root/lib/pathname.rb
Commit message (Collapse)AuthorAgeFilesLines
* * lib/rdoc.rb: massive spelling correction patch from Evan Farrarmatz2008-06-041-1/+1
| | | | | | <evanfarrar at gmail.com> in [ruby-doc:1382] applied. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#sub_ext): new method. [ruby-list:44608]akr2008-02-131-1/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2006-07-081-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Kernel#Pathname): new method.akr2006-06-171-3/+28
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb: use a subclass for instantiation exceptakr2006-04-041-21/+23
| | | | | | | | methods take pathname argument. suggested by Evan Phoenix. [ruby-core:7618] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#each_filename): use split_names properly.akr2006-02-221-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb: use File.basename to decompose pathnames.akr2005-11-261-527/+235
| | | | | | | experimental Windows support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#sub): new method.akr2005-09-231-1/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#descend): Pathname.new("./a/b/c").descendakr2005-09-031-18/+29
| | | | | | | | didn't yield "." (Pathname#ascend): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#descend): new method.akr2005-08-281-0/+96
| | | | | | | (Pathname#ascend): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#unlink): try Dir.unlink first toakr2005-07-101-2/+2
| | | | | | | | avoid unlink a directory by root. cf. [ruby-dev:26237] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* doc fix.akr2005-07-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#unlink): use SystemCallError instead ofakr2005-05-151-1/+1
| | | | | | | | Errno::EISDIR because EISDIR is not portable. [ruby-core:5001] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#unlink): unlink a symlink to a directoryakr2005-05-151-3/+3
| | | | | | | was failed. [ruby-core:4992] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (cleanpath_aggressive): make it private.akr2004-12-121-2/+4
| | | | | | | | (cleanpath_conservative): ditto. Suggested by Daniel Berger. [ruby-core:3914] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#initialize): fix pathname initializationakr2004-05-271-1/+9
| | | | | | | by pathname. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test Kernel.open accepts pathname object.akr2004-05-241-1/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_f_open): open should not ignore block when "to_open"matz2004-05-081-4/+0
| | | | | | | | | method is used. [ruby-dev:23478] * ext/dbm/dbm.c (fdbm_modify): typo fixed. [ruby-dev:23473] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test for Kernel.open(Pathname.new(...)) { ... }.akr2004-05-071-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add tests.akr2004-04-261-0/+27
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb: sync taint/freeze flag betweenakr2004-04-231-1/+33
| | | | | | | a pathname object and its internal string object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update the document for to_path.akr2004-04-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_get_path): get path string via "to_path" method ifmatz2004-04-071-1/+1
| | | | | | | | | | | | path object is not a string. [Ruby2] * gc.c (rb_gc_call_finalizer_at_exit): do not free threads in the exit finalizers. * io.c (rb_io_reopen): should use rb_io_check_io(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (Init_Exception): remove Exception#to_str. [Ruby2]matz2004-04-051-0/+4
| | | | | | | | | | | * eval.c (error_print): should no call "to_str" anymore use "message" method instead. * io.c (rb_f_open): Kernel#open() calls "to_open" if the first argument responds to it. [Ruby2] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb: use assert_raise instead of assert_raises.akr2004-02-111-4/+4
| | | | | | | | | | | | * 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/trunk@5673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (rb_set_class_path): do not set path ifmatz2004-01-191-2/+2
| | | | | | | | * lib/cgi.rb (CGI::QueryExtension): give extended string, not a delegater object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (primary): allow no "when" case. [ruby-dev:22578]matz2004-01-131-0/+8
| | | | | | | | | * ruby.h (rb_class_of): reduce branch. [ruby-dev:22577] * ruby.h (rb_type): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb: Corrected small coding error.gsinclair2003-12-311-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb: Completed documentation.gsinclair2003-12-311-107/+266
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Re-applied revision 1.21 as its changes were lost on the way to 1.22gsinclair2003-12-301-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb: Added documentation.gsinclair2003-12-291-18/+186
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/pathname.rb (PathnameTest#test_plus): add 2 assertions.akr2003-12-261-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/pathname.rb (Pathname#+): re-implemented to resolve ".." inakr2003-12-211-27/+61
| | | | | | | | | 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
* * lib/pathname.rb (Pathname#link, Pathname#symlink): obsoleted.akr2003-12-031-2/+16
| | | | | | | (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
* previous change refined.akr2003-11-281-3/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#realpath): obsolete the force_absoluteakr2003-11-281-3/+5
| | | | | | | argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add document that pathname.rb supports only Unix style pathnames.akr2003-11-251-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* (Pathname#parent): if self is `.', return `..'.akr2003-11-071-11/+44
| | | | | | | | | | | (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
* lib/pathname.rb (Pathname#+): if self or the argument is `.', return another.akr2003-11-071-0/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#+): return the argument if self is `.'.akr2003-11-071-2/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_s_union, Init_Regexp): new method `Regexp.union'.akr2003-10-291-32/+36
| | | | | | | | * 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
* * lib/pathname.rb (foreachline, dir_foreach): add obsolete warning.akr2003-10-191-9/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (realpath): make ELOOP check bit more robust.akr2003-10-131-9/+39
| | | | | | | | (children): prepend self by default. (chroot): obsoleted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix previous change.akr2003-10-111-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (realpath): check existence of the file.akr2003-10-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (realpath): re-implemented.akr2003-10-111-54/+32
| | | | | | | (realpath_root?, realpath_rec): removed git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (realpath_rec): fix handling of symlink to absoluteakr2003-10-111-6/+8
| | | | | | | path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb: version information is added in document.akr2003-10-051-3/+39
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (initialize): raise ArgumentError if argument hasakr2003-10-041-19/+107
| | | | | | | | | | '\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
* * lib/pathname.rb (initialize): duplicate and freeze argument.akr2003-10-031-3/+24
| | | | | | | | | (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