JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-6843

Encoding::UndefinedConversionError when reading from IO stream given by open-uri's Kernel#open()

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.7.0.pre2
    • Fix Version/s: JRuby 1.7.0.RC1
    • Component/s: Encoding, Standard Library
    • Labels:
      None
    • Environment:
      Mac OS X 10.7.4 Java 1.7.0_05
    • Number of attachments :
      0

      Description

      jruby-1.7.0.preview2 :001 > require 'open-uri'
       => true 
      jruby-1.7.0.preview2 :002 > open('http://www.isc.tamu.edu/~lewing/linux/sit3-shine.7.gif') { |f| f.read }
      Encoding::UndefinedConversionError: Input length = 1
      	from org/jruby/RubyIO.java:2892:in `read'
      	from (irb):2:in `evaluate'
      	from /Users/tim/.rvm/rubies/jruby-1.7.0.preview2/lib/ruby/1.9/open-uri.rb:150:in `open_uri'
      	from /Users/tim/.rvm/rubies/jruby-1.7.0.preview2/lib/ruby/1.9/open-uri.rb:677:in `open'
      	from /Users/tim/.rvm/rubies/jruby-1.7.0.preview2/lib/ruby/1.9/open-uri.rb:33:in `open'
      	from (irb):2:in `evaluate'
      	from org/jruby/RubyKernel.java:1070:in `eval'
      	from org/jruby/RubyKernel.java:1395:in `loop'
      	from org/jruby/RubyKernel.java:1178:in `catch'
      	from org/jruby/RubyKernel.java:1178:in `catch'
      	from /Users/tim/.rvm/rubies/jruby-1.7.0.preview2/bin/irb:17:in `(root)'
      jruby-1.7.0.preview2 :003 >
      

        Activity

        Hide
        Tim Olsen added a comment -

        open() is now working for me with jruby-head, but ::Mongoid::Sessions.default.drop() still fails

        Show
        Tim Olsen added a comment - open() is now working for me with jruby-head, but ::Mongoid::Sessions.default.drop() still fails
        Hide
        Tim Olsen added a comment -

        I'm using:

        $ jruby -v
        jruby 1.7.0.preview2 (1.9.3p203) 2012-08-30 b16f8c3 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_05-b06 [darwin-x86_64]

        Show
        Tim Olsen added a comment - I'm using: $ jruby -v jruby 1.7.0.preview2 (1.9.3p203) 2012-08-30 b16f8c3 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_05-b06 [darwin-x86_64]
        Hide
        Charles Oliver Nutter added a comment -

        I would consider that a separate issue. Perhaps you can open a separate bug for it and (hopefully) provide more info + reproduction?

        Show
        Charles Oliver Nutter added a comment - I would consider that a separate issue. Perhaps you can open a separate bug for it and (hopefully) provide more info + reproduction?
        Hide
        Tim Olsen added a comment -

        Sure. I'll create a new issue.

        Show
        Tim Olsen added a comment - Sure. I'll create a new issue.
        Hide
        Charles Oliver Nutter added a comment -

        Calling this fixed, since I and another reporter can no longer reproduce on master.

        Show
        Charles Oliver Nutter added a comment - Calling this fixed, since I and another reporter can no longer reproduce on master.

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Tim Olsen
          • Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: