[TxMt] Re: xcode message when running ruby

rburrowes r.burrowes at auckland.ac.nz
Thu Apr 2 02:45:50 UTC 2009


The code is on Rubyforge in 

http://gedcom.rubyforge.org/git?p=gedcom.git;a=tree

Or via git using

git clone git://rubyforge.org/gedcom.git

I could email you a copy if you wanted. It is about 500K. I haven't sat down
and tried to work out the minimum code that will generate the error.

Running test/gedcom, after removing the comments from around
lib/gedcom/transmission.rb's summary method, will print the string, print
the string to /tmp/xx.txt and print the string again. Both prints give the
error, but the file copy is correct.

The string is produced calling f.to_gedcom, which is a method in
lib/gedcom/gedcom_base.rb. This actually walks through all the other objects
that were created from the classes in lib/gedcom/*.rb. It isn't that easy to
follow.

The error will go away if @@tabs = false, rather than true. This stops the
leading spaces being added to the lines in the string (in method
GedcomBase.tabstop in gedcom_base.rb). The line "      3 Time ..." becoming
"3 TIME ...". The error is there for Ruby 1.8.6 and Ruby 1.9.1.


Alex Ross-8 wrote:
> 
> On Apr 1, 2009, at 2:15 AM, rburrowes wrote:
> 
>> Now that I think on it, I have had one other odd thing happen. My  
>> Ruby code
>> seems to cause problems when writing to the output window. I print a  
>> longish
>> multi-line string and get an error at the 11th line.
>>
>> "at top level in 3 TIME 15 at line 56"
>>
>> The same string, printed to a file, outputs correctly. the "3 TIME  
>> 15" is
>> the first part of the 11th line. I can get the error consistently,  
>> before
>> and after printing the string to a file and the file copy is always  
>> right. I
>> also don't see the error if I run the Ruby code on the command line.  
>> Could I
>> be overflowing a buffer somewhere and trashing something I shouldn't  
>> be.
>> Seems unlikely though, and I can't reproduce a corruption of the  
>> bundle this
>> way.
> 
> Example code so I can reproduce it?
> 
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
> 
> 

-- 
View this message in context: http://www.nabble.com/xcode-message-when-running-ruby-tp22820086p22839809.html
Sent from the textmate users mailing list archive at Nabble.com.




More information about the textmate mailing list