aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/file.c b/file.c
index 09be42415a..ac7ee25a57 100644
--- a/file.c
+++ b/file.c
@@ -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) {