tenderlove/nokogiri — Issue #556: TypeError: can't convert Fixnum into String
Author: vschiavoni
Created: 2011-10-30 21:55:19+00:00
State: open

I get a read_memory error. Here's the testcase :
```ruby
def test_graph_5_malformed
input="\n\n\n\t\n\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\n"
input.delete!"\n","\t","\\"
puts "Cleaned input:\n"+ input
graph = Nokogiri::XML(input, options=Nokogiri::XML::ParseOptions::STRICT)
end
```

This is the error I get with Ruby 1.9.2 and 1.8.7, latest gem:

```ruby
1) Error:
test_graph_5_malformed(TestTopologyParser):
TypeError: can't convert Fixnum into String
/Users/veleno/.rvm/gems/ruby-1.8.7-p302/gems/nokogiri-1.5.0/lib/nokogiri/xml/document.rb:33:in `read_memory'
/Users/veleno/.rvm/gems/ruby-1.8.7-p302/gems/nokogiri-1.5.0/lib/nokogiri/xml/document.rb:33:in `parse'
/Users/veleno/.rvm/gems/ruby-1.8.7-p302/gems/nokogiri-1.5.0/lib/nokogiri/xml.rb:33:in `XML'
test_topology_parser.rb:199:in `test_graph_5_malformed'
```