Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jruby/lib/io/console/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def tty?(*modes)
end
super()
end
alias isatty tty?
end
private_constant :PlatformTty
end
4 changes: 4 additions & 0 deletions test/io/console/test_io_console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ def test_tty?
assert_equal(STDIN.tty?, STDIN.tty?(nil))
end

def test_isatty
assert_equal(IO.instance_method(:tty?), IO.instance_method(:isatty))
end

def test_tty_non_tty
File.open(IO::NULL) do |f|
assert_not_predicate(f, :tty?)
Expand Down
Loading