Comments (6)
That's interesting. I have no answer to that apart from the referenced commit which will ensure that if the method is not present it will simply move on to another check. One thing that may also be the reason for intermittent check of readline is that the io/console
is checked first and if it suceeds it never checks readline. So it maybe the failure of loading the io/console
that forces the readline
check but that's just unconfirmed suspicion.
Once I've done all the checks on jruby and windows I will release a patch version. I'm also planning to release a new version this coming weekend that simplifies the TTY::Screen
and removes the need for instatiation and provides just simple module. Also I may add new checks including calling ioctl
etc... Who would imagine that getting terminal size is such a hard task!
from tty-screen.
Hey Kimmo,
Thanks for reporting this. I've had a quick look and I think this is due to the fact that Ruby readline is a wrapper over native OS readline implantation which varies across different systems. For example the get_screen_size
doesn't exist on windows.
I hope I will find some time today, I'm going after work to repetitively pick up and put down some heavy items but should have enough time to release a fix.
from tty-screen.
I still need to perform few tests on Windows box and jruby to make sure all the methods for inferring size work as expected.
from tty-screen.
The strange thing is that @matti says it's occasional and doesn't happen 100% of the time. Also from the path I assume it's running on a mac.
from tty-screen.
yep, mac os sierra running in terraform local-exec.
from tty-screen.
Released v0.5.1
which should automatically be pulled through by all the parent tty
dependencies that use it. I've checked all calls on Debian/Mac/Windows to fix pretty much all issues. So I hope you won't have any issues with the latest release. Can you please upgrade and let me know?
from tty-screen.
Related Issues (11)
- Operation not supported on socket @ rb_ioctl HOT 1
- Spurious "stty: standard input" output on stderr from TTY::Screen.size when running on Alpine Linux within a PTY.spawn process from within rspec HOT 2
- tty/version.rb in both tty-screen and tty-cursor HOT 2
- Question re: screen resizing HOT 1
- TTY::Screen.width not respecting my Terminal window size HOT 5
- Error with 0.8.0 - NoMethodError: undefined method `ioctl' for #<StringIO> HOT 9
- "TTY::Screen#size_from_ioctl reads terminal size" test fails on big endian systems HOT 5
- `TTY::Screen#size_from_ioctl reads terminal size` is failing in s390x HOT 2
- Method size returns [1,1] on Windows (mingw) when no TTY is present HOT 2
- Support reline after retiring ext/readline in ruby 3.3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tty-screen.