Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.7.0.pre1
    • Fix Version/s: JRuby 1.7.0.pre2
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      IO.read fails to read piped commands. It works fine in JRuby 1.6.7.2 and MRI, but is broken in 1.7.0-preview1 and the latest preview2 snapshot.

      Expected (JRuby 1.6.7.2):

      irb(main):001:0> IO.read("|echo hi")
      => "hi\n"
      

      Actual (jruby 1.7.0.preview2.dev (1.9.3p203) 2012-08-02 4cdee37 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_05-b05 [linux-amd64]):

      irb(main):001:0> IO.read("|echo hi")
      TypeError: can't convert Hash into String
      	from org/jruby/RubyKernel.java:325:in `open'
      	from org/jruby/RubyIO.java:3615:in `read'
      	from org/jruby/RubyIO.java:3712:in `read'
      	from (irb):1:in `evaluate'
      

        Activity

        Hide
        Thomas E Enebo added a comment -

        Fixed in commit 158ed61. We were calling 1.8 popen instead of 1.9 popen.

        Show
        Thomas E Enebo added a comment - Fixed in commit 158ed61. We were calling 1.8 popen instead of 1.9 popen.

          People

          • Assignee:
            Thomas E Enebo
            Reporter:
            Kevin Menard
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: