summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-08 09:34:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-08 09:34:46 +0000
commit25d14edf294cd0e79dfb89217025396edf3e1245 (patch)
treeedd89f0853d9dc90cc970dc66008419fcb8d6f24 /io.c
parent03149710e8fe06daef196b1ea890608ca40eb02c (diff)
* io.c (rb_io_s_binread): ensures file path. [ruby-dev:37940]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io.c b/io.c
index edfcdd646f..9cac7631c4 100644
--- a/io.c
+++ b/io.c
@@ -7370,6 +7370,7 @@ rb_io_s_binread(int argc, VALUE *argv, VALUE io)
struct foreach_arg arg;
rb_scan_args(argc, argv, "12", NULL, NULL, &offset);
+ FilePathValue(argv[0]);
arg.io = rb_io_open(argv[0], rb_str_new_cstr("rb:ASCII-8BIT"), Qnil, Qnil);
if (NIL_P(arg.io)) return Qnil;
arg.argv = argv+1;