summaryrefslogtreecommitdiffstats
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
commita0708e0e0116ed88881f998317a4129226a6c427 (patch)
treee547d54ddfa2c6ec5f099351e375767d9d85ad93 /file.c
parent7fb25229102019ffa33dad5c6fe5586c2dccf8a8 (diff)
downloadruby-a0708e0e0116ed88881f998317a4129226a6c427.tar.gz
ruby-a0708e0e0116ed88881f998317a4129226a6c427.tar.xz
ruby-a0708e0e0116ed88881f998317a4129226a6c427.zip
* 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: http://svn.ruby-lang.org/repos/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 a8df504ae..a9864f570 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);
}