aboutsummaryrefslogtreecommitdiffstats
path: root/lib/pathname.rb
Commit message (Collapse)AuthorAgeFilesLines
* * ext/pathname/lib/pathname.rb: moved from lib/pathname.rb.akr2010-07-171-1053/+0
| | | | | | | | | | | | require pathname.so. * ext/pathname/pathname.c: new file to define empty Pathname class. * ext/pathname/extconf.rb: new file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Fix unused variable warnings.marcandre2010-07-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | Patch by Run Paint [ruby-core:30991] * lib/date.rb: ditto * lib/debug.rb: ditto * lib/drb/drb.rb: ditto * lib/drb/invokemethod.rb: ditto * lib/irb/ruby-lex.rb: ditto * lib/irb/slex.rb: ditto * lib/logger.rb: ditto * lib/pathname.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c: add optional basedir argument for realpath/realdirpath.akr2010-03-071-4/+4
| | | | | | | | | | | | | (realpath_internal): handle basedir. (rb_file_s_realpath): extract basedir from argument list. (rb_file_s_realdirpath): extract basedir from argument list. * lib/pathname.rb (realpath): pass basedir. (realdirpath): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * prelude.rb (require_relative): use File.realpath. [ruby-dev:40040]akr2010-01-121-57/+2
| | | | | | | | | | | | | | | | | * include/ruby/intern.h: declare rb_dir_getwd. * dir.c (rb_dir_getwd): copied from dir_s_getwd to export. (dir_s_getwd): use rb_dir_getwd. * file.c (rb_file_s_realpath): new method File.realpath. (rb_file_s_realdirpath): new method File.realdirpath. * lib/pathname.rb (Pathname#realpath): use File.realpath. (Pathname#realdirpath): use File.realdirpath. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname::SAME_PATHS): FNM_SYSCASE is alwaysnobu2009-10-231-1/+1
| | | | | | | non-nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#sub): suppress a warning. [ruby-dev:38488]akr2009-05-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#relative_path_from): compares pathnobu2009-03-281-2/+9
| | | | | | | | components according to system default case-sensitiveness. [ruby-core:22829] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#sub): set $~ in block.binding.akr2009-03-171-1/+15
| | | | | | | [ruby-dev:38173] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc (add Pathname#binread)kazu2009-02-271-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#foreachline): removed wronglymatz2009-02-231-6/+0
| | | | | | resurrected method. [ruby-dev:38065] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#binread): added. [ruby-dev:37952]matz2009-02-211-1/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb: obsolete methods removed.akr2009-02-141-52/+0
| | | | | | | | [ruby-core:21564] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update rdoc.akr2009-01-311-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-01-311-24/+24
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#each_child): new method.akr2009-01-311-0/+31
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#realdirpath): new method.akr2009-01-301-15/+40
| | | | | | | | [ruby-dev:36290] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (chop_basename, prepend_prefix): use o option.nobu2009-01-261-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#=~): undefed. at asakusa.rb.akr2008-12-111-0/+4
| | | | | | | [ruby-core:19690] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (each_filename): return Enumerator if no blockmame2008-09-231-0/+1
| | | | | | | | | given. * test/pathname/test_pathname.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* trailing space removed.akr2008-09-141-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 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