* ext/pathname/pathname.c (path_f_pathname): Pathname() translated
from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e7381db962
commit
a5a51abfc5
@ -1,3 +1,8 @@
|
|||||||
|
Wed Sep 22 00:00:05 2010 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* ext/pathname/pathname.c (path_f_pathname): Pathname() translated
|
||||||
|
from pathname.rb.
|
||||||
|
|
||||||
Tue Sep 21 22:18:30 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
Tue Sep 21 22:18:30 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* tool/mkconfig.rb: fixed build problem on mswin64 introduced in r29278.
|
* tool/mkconfig.rb: fixed build problem on mswin64 introduced in r29278.
|
||||||
|
@ -525,13 +525,3 @@ class Pathname # * FileUtils *
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
module Kernel
|
|
||||||
# create a pathname object.
|
|
||||||
#
|
|
||||||
# This method is available since 1.8.5.
|
|
||||||
def Pathname(path) # :doc:
|
|
||||||
Pathname.new(path)
|
|
||||||
end
|
|
||||||
private :Pathname
|
|
||||||
end
|
|
||||||
|
@ -961,6 +961,17 @@ path_unlink(VALUE self)
|
|||||||
return rb_rescue2(unlink_body, str, unlink_rescue, str, eENOTDIR, (VALUE)0);
|
return rb_rescue2(unlink_body, str, unlink_rescue, str, eENOTDIR, (VALUE)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* create a pathname object.
|
||||||
|
*
|
||||||
|
* This method is available since 1.8.5.
|
||||||
|
*/
|
||||||
|
static VALUE
|
||||||
|
path_f_pathname(VALUE self, VALUE str)
|
||||||
|
{
|
||||||
|
return rb_class_new_instance(1, &str, rb_cPathname);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* == Pathname
|
* == Pathname
|
||||||
*
|
*
|
||||||
@ -1225,4 +1236,5 @@ Init_pathname()
|
|||||||
rb_define_method(rb_cPathname, "unlink", path_unlink, 0);
|
rb_define_method(rb_cPathname, "unlink", path_unlink, 0);
|
||||||
rb_define_method(rb_cPathname, "delete", path_unlink, 0);
|
rb_define_method(rb_cPathname, "delete", path_unlink, 0);
|
||||||
rb_undef_method(rb_cPathname, "=~");
|
rb_undef_method(rb_cPathname, "=~");
|
||||||
|
rb_define_global_function("Pathname", path_f_pathname, 1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user