Skip to content

$stdin.tty? reports wrong value on JRuby-9.0.0.0-pre1 #2627

@mvz

Description

@mvz

When stdin is a pipe, $stdin.tty? should return false. On JRuby-9.0.0.0-pre1 it returns true:

[matijs@walnut] rbenv shell jruby-9.0.0.0-pre1
[matijs@walnut] echo '' | ruby -e 'p $stdin.tty?'
true
[matijs@walnut] rbenv shell 2.2.0
[matijs@walnut] echo '' | ruby -e 'p $stdin.tty?'
false
[matijs@walnut] rbenv shell jruby-1.7.18
[matijs@walnut] echo '' | ruby -e 'p $stdin.tty?'
false

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions