diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-09 03:18:21 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-09 03:18:21 +0000 |
commit | d5a72f00c24baf10442ed6119b62bc9fa7d1fac5 (patch) | |
tree | aad7542d6e9045277c145d7a7b2cd01a03256c88 /file.c | |
parent | 23d8ace77f84aac13185413835377cfe3fc61b94 (diff) | |
download | ruby-d5a72f00c24baf10442ed6119b62bc9fa7d1fac5.tar.gz ruby-d5a72f00c24baf10442ed6119b62bc9fa7d1fac5.tar.xz ruby-d5a72f00c24baf10442ed6119b62bc9fa7d1fac5.zip |
* file.c (rb_get_path): use the original object if to_path method is
not defined. [ruby-dev:32473]
* io.c (rb_f_open): call to_open on non-string objects, instead of
to_str. [ruby-dev:32473]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -111,6 +111,9 @@ rb_get_path(VALUE obj) if (rb_respond_to(obj, to_path)) { tmp = rb_funcall(obj, to_path, 0, 0); } + else { + tmp = obj; + } exit: StringValueCStr(tmp); if (obj != tmp) { |