summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-25 05:57:37 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-25 05:57:37 +0000
commit5cc2093ccd5c91fe2eeb0e9a7757985569eed1c2 (patch)
treee547d54ddfa2c6ec5f099351e375767d9d85ad93 /file.c
parent8366008bcf2e71002c7338f9400968ddac2aad40 (diff)
* hash.c (recursive_hash): remove unused local variable.
* parse.y (parser_yylex): ditto. * parse.y (rb_gc_mark_symbols): fix unmatched prototype . * file.c (rb_get_path): check NUL byte in the path string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/file.c b/file.c
index a8df504ae1..a9864f5703 100644
--- a/file.c
+++ b/file.c
@@ -111,11 +111,10 @@ rb_get_path(VALUE obj)
to_path = rb_intern("to_path");
}
if (rb_respond_to(obj, to_path)) {
- obj = rb_funcall(obj, to_path, 0, 0);
+ tmp = rb_funcall(obj, to_path, 0, 0);
}
- tmp = obj;
- StringValueCStr(tmp);
exit:
+ StringValueCStr(tmp);
if (obj != tmp) {
rb_check_safe_obj(tmp);
}