You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using rails 3.2 active support method Hash.from_xml produces an error when passed a File object.
Works in JRuby 1.7.22, broken in 9.0.4.0
Recreate (w/ Rails active support):
simple_hash={:test=>{:a=>"b",:c=>"d"}}.to_xmlFile.open("simple_hash.xml","w"){|f| f << simple_hash}xml_file=File.open("simple_hash.xml")Hash.from_xml(xml_file)['hash']# Throws Exception
Error
IOError: byte oriented read for character buffered IO
from nokogiri/XmlDocument.java:327:in `read_io'
from C:/jruby-9.0.4.0/lib/ruby/gems/shared/gems/nokogiri-1.5.5-java/lib/nokogiri/xml/document.rb:50:in `parse'
from C:/jruby-9.0.4.0/lib/ruby/gems/shared/gems/nokogiri-1.5.5-java/lib/nokogiri/xml.rb:33:in `XML'
from C:/jruby-9.0.4.0/lib/ruby/gems/shared/gems/activesupport-3.2.20/lib/active_support/xml_mini/nokogiri.rb:28:in `parse'
from C:98:in `parse'
from C:/jruby-9.0.4.0/lib/ruby/gems/shared/gems/activesupport-3.2.20/lib/active_support/core_ext/hash/conversions.rb:98:in `from_xml'
from (irb):20:in `<eval>'
from org/jruby/RubyKernel.java:978:in `eval'
from org/jruby/RubyKernel.java:1291:in `loop'
from org/jruby/RubyKernel.java:1098:in `catch'
from org/jruby/RubyKernel.java:1098:in `catch'
from C:/jruby-9.0.4.0/lib/ruby/gems/shared/gems/railties-3.2.20/lib/rails/commands/console.rb:47:in `start'
from C:/jruby-9.0.4.0/lib/ruby/gems/shared/gems/railties-3.2.20/lib/rails/commands/console.rb:8:in `start'
from C:/jruby-9.0.4.0/lib/ruby/gems/shared/gems/railties-3.2.20/lib/rails/commands.rb:41:in `<top>'
from org/jruby/RubyKernel.java:939:in `require'
from script/rails:6:in `<top>'
Environment
jruby 9.0.4.0 (2.2.2) 2015-11-12 b9fb7aa Java HotSpot(TM) 64-Bit Server VM 25.65-b01 on 1.8.0_65-b17 +jit [Windows Server 2008 R2-amd64]
The text was updated successfully, but these errors were encountered:
Using rails 3.2 active support method Hash.from_xml produces an error when passed a File object.
Works in JRuby 1.7.22, broken in 9.0.4.0
Recreate (w/ Rails active support):
Error
Environment
The text was updated successfully, but these errors were encountered: