[macruby-changes] [4900] MacRuby/trunk/io.c
source_changes at macosforge.org
source_changes at macosforge.org
Tue Nov 9 19:24:37 PST 2010
Revision: 4900
http://trac.macosforge.org/projects/ruby/changeset/4900
Author: watson1978 at gmail.com
Date: 2010-11-09 19:24:35 -0800 (Tue, 09 Nov 2010)
Log Message:
-----------
moved a rb_io_assert_readable() to the appropriate point.
Modified Paths:
--------------
MacRuby/trunk/io.c
Modified: MacRuby/trunk/io.c
===================================================================
--- MacRuby/trunk/io.c 2010-11-09 14:16:09 UTC (rev 4899)
+++ MacRuby/trunk/io.c 2010-11-10 03:24:35 UTC (rev 4900)
@@ -1343,8 +1343,6 @@
if (argc != 0) {
rb_scan_args(argc, argv, "02", &sep, &limit);
}
- rb_io_t *io_struct = ExtractIOStruct(io);
- rb_io_assert_readable(io_struct);
if (NIL_P(rb_rs)) {
// TODO: Get rid of this when the fix comes in for the $\ variable.
@@ -1380,6 +1378,7 @@
rb_io_t *io_struct = ExtractIOStruct(io);
VALUE bstr = rb_bstr_new();
+ rb_io_assert_readable(io_struct);
if (NIL_P(sep)) {
if (line_limit != -1) {
rb_bstr_resize(bstr, line_limit);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101109/3c494641/attachment.html>
More information about the macruby-changes
mailing list