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

37 commits

Author SHA1 Message Date
akr
d8cf22793b * lib/pathname.rb (Pathname#initialize): fix pathname initialization
by pathname.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-27 12:41:10 +00:00
akr
614537d5fa test Kernel.open accepts pathname object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-24 11:56:50 +00:00
matz
2c247e3d6b * io.c (rb_f_open): open should not ignore block when "to_open"
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
2004-05-08 08:12:08 +00:00
akr
ac5f6e0a60 add a test for Kernel.open(Pathname.new(...)) { ... }.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-07 23:22:28 +00:00
akr
10b598499b add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-26 16:27:57 +00:00
akr
cd322e0403 * 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/trunk@6205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-23 07:40:50 +00:00
akr
ae8dfe8626 update the document for to_path.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-07 05:33:19 +00:00
matz
4ded52b623 * file.c (rb_get_path): get path string via "to_path" method if
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
2004-04-07 02:51:05 +00:00
matz
ce44928d2b * error.c (Init_Exception): remove Exception#to_str. [Ruby2]
* 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
2004-04-05 15:55:09 +00:00
akr
166b3957e0 * 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/trunk@5673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-11 17:36:37 +00:00
matz
22c005569b * variable.c (rb_set_class_path): do not set path if
* 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
2004-01-19 09:19:31 +00:00
matz
6760a5ed9f * parse.y (primary): allow no "when" case. [ruby-dev:22578]
* 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
2004-01-13 05:48:59 +00:00
gsinclair
bd45695886 * lib/pathname.rb: Corrected small coding error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-31 06:09:22 +00:00
gsinclair
29b7f2efca * lib/pathname.rb: Completed documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-31 05:47:45 +00:00
gsinclair
5e6d81e717 Re-applied revision 1.21 as its changes were lost on the way to 1.22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-30 10:13:54 +00:00
gsinclair
db93a78e63 * lib/pathname.rb: Added documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-29 22:31:55 +00:00
akr
88947c09c4 lib/pathname.rb (PathnameTest#test_plus): add 2 assertions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@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