Skip to content
Permalink
Browse files

Added IO#tty?

  • Loading branch information
Alex Gaynor
Alex Gaynor committed Apr 21, 2013
1 parent 18e888e commit 3f5bec6ea5245b270b1733a9f7e365ccb8a06e7f
Showing with 6 additions and 4 deletions.
  1. +0 −2 topaz.mspec
  2. +6 −2 topaz/objects/ioobject.py
@@ -52,14 +52,12 @@ class MSpecScript
"^#{Rubyspec}/core/io/each_spec.rb",
"^#{Rubyspec}/core/io/each_line_spec.rb",
"^#{Rubyspec}/core/io/foreach_spec.rb",
"^#{Rubyspec}/core/io/isatty_spec.rb",
"^#{Rubyspec}/core/file/stat/ftype_spec.rb",
"^#{Rubyspec}/core/file/socket_spec.rb",
"^#{Rubyspec}/core/file/ftype_spec.rb",
"^#{Rubyspec}/core/file/open_spec.rb",
"^#{Rubyspec}/core/io/dup_spec.rb",
"^#{Rubyspec}/core/io/sysopen_spec.rb",
"^#{Rubyspec}/core/io/tty_spec.rb",
"^#{Rubyspec}/core/method/arity_spec.rb",
"^#{Rubyspec}/core/method/call_spec.rb",
"^#{Rubyspec}/core/method/clone_spec.rb",
@@ -1,7 +1,5 @@
import os

from rpython.rlib import jit

from topaz.coerce import Coerce
from topaz.error import error_for_oserror
from topaz.module import ClassDef
@@ -254,3 +252,9 @@ def method_stat(self, space):
stat_obj = W_FileStatObject(space)
stat_obj.set_stat(stat_val)
return stat_obj

@classdef.method("isatty")
@classdef.method("tty?")
def method_isatty(self, space):
self.ensure_not_closed(space)
return space.newbool(os.isatty(self.fd))

0 comments on commit 3f5bec6

Please sign in to comment.
You can’t perform that action at this time.