Missing method: File#isatty
---------------------------

                 Key: JRUBY-1893
                 URL: http://jira.codehaus.org/browse/JRUBY-1893
             Project: JRuby
          Issue Type: Sub-task
            Reporter: Charles Oliver Nutter
            Assignee: Thomas E Enebo
             Fix For: JRuby 1.1


May or may not be something we can implement.

Error:

{noformat}
  3) Error:
test_isatty(TestIO):
NoMethodError: undefined method `isatty' for #<File:_test/_10lines>
    test/rubicon/test_io.rb:621:in `test_isatty'
    test/rubicon/test_io.rb:621:in `open'
    test/rubicon/test_io.rb:621:in `test_isatty'
    test/rubicon/test_io.rb:621:in `run'
{noformat}

Test:

{code}
  def test_isatty
    File.open(@file) { |f|  assert(!f.isatty) }
    if WIN32 
      File.open("con") { |f| assert(f.isatty) }
    end
    unless WIN32
      begin
        File.open("/dev/tty") { |f| assert(f.isatty) }
      rescue
        # in run from (say) cron, /dev/tty can't be opened
      end
    end
  end
{code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to