Closed zkt closed 11 years ago
This hack "fixes" the error
workers/formaters/unserializers/xml.rb
67 v = v[1..-1].intern if v[0] == ':'
68 if v== ''.intern
69 v=":".intern
70 end
Fixed in next release
Colon punctuation in XML file like this
<punctuation id='2157138080' tag=':' >;</punctuation>
Throws this error /Users/zkt/.rvm/gems/ruby-1.9.3-p327/gems/treat-2.0.4/lib/treat/core/dsl.rb:17:in'
from lib/pre_test.rb:205:in
method_missing': undefined method
to_i' for :"":Symbol (NoMethodError) from /Users/zkt/.rvm/gems/ruby-1.9.3-p327/gems/treat-2.0.4/lib/treat/workers/formatters/unserializers/xml.rb:68:inblock in unserialize' from /Users/zkt/.rvm/gems/ruby-1.9.3-p327/gems/treat-2.0.4/lib/treat/workers/formatters/unserializers/xml.rb:40:in
each_pair' from /Users/zkt/.rvm/gems/ruby-1.9.3-p327/gems/treat-2.0.4/lib/treat/workers/formatters/unserializers/xml.rb:40:inunserialize' from /Users/zkt/.rvm/gems/ruby-1.9.3-p327/gems/treat-2.0.4/lib/treat/entities/entity/delegatable.rb:66:in
call_worker' from /Users/zkt/.rvm/gems/ruby-1.9.3-p327/gems/treat-2.0.4/lib/treat/entities/entity/delegatable.rb:40:inblock (2 levels) in add_workers' from /Users/zkt/.rvm/gems/ruby-1.9.3-p327/gems/treat-2.0.4/lib/treat/entities/entity/buildable.rb:264:in
from_serialized_file' from /Users/zkt/.rvm/gems/ruby-1.9.3-p327/gems/treat-2.0.4/lib/treat/entities/entity/buildable.rb:213:infrom_file' from /Users/zkt/.rvm/gems/ruby-1.9.3-p327/gems/treat-2.0.4/lib/treat/entities/entity/buildable.rb:55:in
build' from /Users/zkt/.rvm/gems/ruby-1.9.3-p327/gems/treat-2.0.4/lib/treat/core/dsl.rb:12:inmethod_missing' from lib/pre_test.rb:208:in
block ineach' from lib/pre_test.rb:205:in
In the workers/formaters/unserializers/xml.rb file is the following code (lines 67 and 68) which causes the error it produces an empty symbol when the colon is processed which then matches the to_i regex