diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-05 03:29:08 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-05 03:29:08 +0000 |
commit | 9373c5efb993dd8cae0526118805449b19af2c22 () | |
tree | 503c05d65e51b27e31bc0dc40e7de44571fb5099 /ext/pathname/pathname.c | |
parent | 19e59705f837f621a7266d6c3d8a9a54bed534bf (diff) |
Pathname#empty? implemented.
* ext/pathname/pathname.c (Pathname#empty?): New method. [ruby-core:76404] [Feature#12596] Proposed by John Backus. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ext/pathname/pathname.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -990,6 +990,22 @@ path_zero_p(VALUE self) return rb_funcall(rb_mFileTest, rb_intern("zero?"), 1, get_strpath(self)); } static VALUE glob_i(RB_BLOCK_CALL_FUNC_ARGLIST(elt, klass)) { @@ -1452,6 +1468,7 @@ Init_pathname(void) rb_define_method(rb_cPathname, "world_writable?", path_world_writable_p, 0); rb_define_method(rb_cPathname, "writable_real?", path_writable_real_p, 0); rb_define_method(rb_cPathname, "zero?", path_zero_p, 0); rb_define_singleton_method(rb_cPathname, "glob", path_s_glob, -1); rb_define_singleton_method(rb_cPathname, "getwd", path_s_getwd, 0); rb_define_singleton_method(rb_cPathname, "pwd", path_s_getwd, 0); |