Project

General

Profile

Feature #6481 ยป add-exists-to-pathname.patch

zzak (Zachary Scott), 05/23/2012 06:48 AM

View differences:

ext/pathname/pathname.c
1226 1226
    rb_define_method(rb_cPathname, "executable?", path_executable_p, 0);
1227 1227
    rb_define_method(rb_cPathname, "executable_real?", path_executable_real_p, 0);
1228 1228
    rb_define_method(rb_cPathname, "exist?", path_exist_p, 0);
1229
    rb_define_method(rb_cPathname, "exists?", path_exist_p, 0);
1229 1230
    rb_define_method(rb_cPathname, "grpowned?", path_grpowned_p, 0);
1230 1231
    rb_define_method(rb_cPathname, "directory?", path_directory_p, 0);
1231 1232
    rb_define_method(rb_cPathname, "file?", path_file_p, 0);
test/pathname/test_pathname.rb
992 992
    with_tmpchdir('rubytest-pathname') {|dir|
993 993
      open("f", "w") {|f| f.write "abc" }
994 994
      assert_equal(true, Pathname("f").exist?)
995
      assert_equal(true, Pathname("f").exists?)
995 996
    }
996 997
  end
997 998

  
998
-