[macruby-changes] [2047] MacRuby/branches/experimental
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jul 22 16:31:40 PDT 2009
Revision: 2047
http://trac.macosforge.org/projects/ruby/changeset/2047
Author: pthomson at apple.com
Date: 2009-07-22 16:31:40 -0700 (Wed, 22 Jul 2009)
Log Message:
-----------
IO#lineno= now calls to_int on its inputs.
Modified Paths:
--------------
MacRuby/branches/experimental/io.c
Removed Paths:
-------------
MacRuby/branches/experimental/spec/frozen/tags/macruby/core/io/lineno_tags.txt
Modified: MacRuby/branches/experimental/io.c
===================================================================
--- MacRuby/branches/experimental/io.c 2009-07-22 20:25:09 UTC (rev 2046)
+++ MacRuby/branches/experimental/io.c 2009-07-22 23:31:40 UTC (rev 2047)
@@ -1351,6 +1351,11 @@
{
rb_io_t *io_s = ExtractIOStruct(io);
rb_io_assert_open(io_s);
+ line_no = rb_check_to_integer(line_no, "to_int");
+ if (NIL_P(line_no))
+ {
+ rb_raise(rb_eTypeError, "lineno's argument must be coercable to integer");
+ }
io_s->lineno = FIX2INT(line_no);
return line_no;
}
Deleted: MacRuby/branches/experimental/spec/frozen/tags/macruby/core/io/lineno_tags.txt
===================================================================
--- MacRuby/branches/experimental/spec/frozen/tags/macruby/core/io/lineno_tags.txt 2009-07-22 20:25:09 UTC (rev 2046)
+++ MacRuby/branches/experimental/spec/frozen/tags/macruby/core/io/lineno_tags.txt 2009-07-22 23:31:40 UTC (rev 2047)
@@ -1 +0,0 @@
-fails:IO#lineno= invokes to_int on non-numeric arguments
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090722/8d6848b8/attachment-0001.html>
More information about the macruby-changes
mailing list