diff --git a/opal/corelib/io.rb b/opal/corelib/io.rb
index <HASH>..<HASH> 100644
--- a/opal/corelib/io.rb
+++ b/opal/corelib/io.rb
@@ -3,6 +3,10 @@ class IO
   SEEK_CUR = 1
   SEEK_END = 2
 
+  def tty?
+    @tty
+  end
+
   attr_accessor :write_proc
 
   def write(string)
Add IO#tty?