History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-1895
Type: Sub-task Sub-task
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Charles Oliver Nutter
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JRuby
JRUBY-1890

IO.popen does not support "-"

Created: 04/Jan/08 08:53 PM   Updated: 15/Feb/08 12:55 PM
Component/s: Core Classes/Modules
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide
popen("-") is not supported in JRuby yet

Error:

  5) Error:
test_s_popen_spawn(TestIO):
IOError: Cannot run program "-" (in directory "/Users/headius/NetBeansProjects/jruby"): -: not found
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testcase.rb:78:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run_suite'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `start_mediator'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:in `start'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit.rb:278:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit.rb:276

Test:

def test_s_popen_spawn
    unless WIN32
      # Spawn an interpreter - WRITE
      parent = $$
      pipe = IO.popen("-", "w")
      
      if pipe
	begin
	  assert_equal(parent, $$)
	  pipe.puts "12"
	  Process.wait pipe.pid
	  assert_equal(12, $?>>8)
	ensure
	  pipe.close
	end
      else
	buff = $stdin.gets
	exit buff.to_i
      end
      
      # Spawn an interpreter - READWRITE
      parent = $$
      p = IO.popen("-", "w+")
      
      if p
	begin
	  assert_equal(parent, $$)
	  p.puts "Hello\n"
	  assert_equal("Goodbye\n", p.gets)
	  Process.wait
	ensure
	  p.close
	end
      else
	puts "Goodbye" if $stdin.gets == "Hello\n"
	exit
      end
    end
  end


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Vladimir Sizikov - 06/Feb/08 01:22 PM
For now, IO.popen("-") raises NotImplementedError instead of IOErorr (rev. 5849).

Charles Oliver Nutter - 15/Feb/08 12:55 PM
Removing target release from issues that fit any of the following criteria:
  • No known way to fix them
  • Java integration enhancements out of scope for 1.1 release
  • Other out of scope issues for 1.1