summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-22 09:48:27 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-22 09:48:27 +0000
commit23bc5b66a9766b56774c30fbb60578e81094ec3c (patch)
tree1b4703c3ab060ed8544c71415c009e6261fc6002
parent1a5a4c8a0a0d3e7a9a1c23a9d565bd0e806b0c0a (diff)
merges r22121 from trunk into ruby_1_9_1.
* io.c (rb_io_s_binread): ensures file path. [ruby-dev:37940] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@22519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--io.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 741bb163b..f7aec738c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Feb 8 18:34:43 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * io.c (rb_io_s_binread): ensures file path. [ruby-dev:37940]
+
Fri Feb 6 23:28:33 2009 Tanaka Akira <akr@fsij.org>
* io.c (io_fread): use rb_io_wait_readable for retry
diff --git a/io.c b/io.c
index 50eaa5f26..5a91e04c6 100644
--- a/io.c
+++ b/io.c
@@ -7292,6 +7292,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;