Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mvz opened this Issue Feb 27, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@mvz
Copy link

mvz commented Feb 27, 2015

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
@headius

This comment has been minimized.

Copy link
Member

headius commented Mar 12, 2015

We probably have some special-case logic to always make stdio report it is a tty.

@headius headius closed this in 4d05b2a Mar 12, 2015

@headius headius added this to the 9.0.0.0.pre2 milestone Mar 12, 2015

@mvz

This comment has been minimized.

Copy link
Author

mvz commented Mar 14, 2015

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.