[macruby-changes] [5068] MacRuby/trunk/lib/stringio.rb
source_changes at macosforge.org
source_changes at macosforge.org
Tue Dec 21 20:32:17 PST 2010
Revision: 5068
http://trac.macosforge.org/projects/ruby/changeset/5068
Author: lsansonetti at apple.com
Date: 2010-12-21 20:32:13 -0800 (Tue, 21 Dec 2010)
Log Message:
-----------
fix a bug in StringIO#puts when called with recursive arrays
Modified Paths:
--------------
MacRuby/trunk/lib/stringio.rb
Modified: MacRuby/trunk/lib/stringio.rb
===================================================================
--- MacRuby/trunk/lib/stringio.rb 2010-12-22 04:15:37 UTC (rev 5067)
+++ MacRuby/trunk/lib/stringio.rb 2010-12-22 04:32:13 UTC (rev 5068)
@@ -574,8 +574,17 @@
else
begin
arg = arg.to_ary
- arg.each {|a| puts a }
- next
+ recur = false
+ arg.each do |a|
+ if arg == a
+ recur = true
+ break
+ else
+ puts a
+ end
+ end
+ next unless recur
+ line = '[...]'
rescue
line = arg.to_s
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101221/0665d2df/attachment.html>
More information about the macruby-changes
mailing list