Comments (10)
the offending code seems to be
class Win32API
...
@func = DL::CFunc.new(handle[func], TYPEMAP[export.tr("VPpNnLlIi", "0SSI")], func)
...
ret, = @func.call(args)
does this mean that win32api is the cause, i wonder?
from rb-readline.
Can you provide a detailed use case? Please, I'm not expert on the code so need test cases to verify and investigate solutions.
from rb-readline.
certainly.
RbReadline::RB_READLINE_VERSION
=> "0.1.2"
Thread.new { loop { sleep 1; puts '.'; } }
=> #<Thread:0x29ed640 sleep>
Now dots from that thread should appear once per second--you'll notice that they don't. That's about it.
from rb-readline.
Neither does a normal program until you do Thread#join.
Anyhow, this is related to the scan of events from the keyboard.
Can you test this over Linux/OSX? Tools like Highline and AFAIK GNU Readline suffered the same.
from rb-readline.
Interesting. Linux 1.8.7 with pure ruby seems to not have this problem. Linux 1.8.7 with gnu readline seems to not have it, either.
windows seems to have the problem with both gnu readline and pure ruby readline.
Thankfully it's not a problem that people really care about. I think it's more of a feature request for the win32api people [?]
from rb-readline.
Actually is a known threading issue with Ruby and Windows. win32utils guys worked on a patch for Ruby's select() that never got integrated.
from rb-readline.
gotcha--it's a problem that select in doze by default can't handle stdin or what not. anyway I made the request to the win32 guys so it's up to them now.
Thanks!
-r
from rb-readline.
I believe this is more of a core problem
from rb-readline.
Hello, is this still valid on current releases of RubyInstaller and master?
Please update this with your testing.
Going to close this if no update is given.
Thank you.
from rb-readline.
Hello,
Latest rb-readline already support this:
require 'readline'
Thread.new { loop { sleep 1; print '.' } }
loop do
line = Readline::readline('> ')
Readline::HISTORY.push(line)
puts "You typed: #{line}"
break if line == 'quit'
end
Works properly.
Closing this out.
from rb-readline.
Related Issues (20)
- IRB and readline with non english keyboards on Windows HOT 1
- Alt+. crashes in `_extract_last_quote` when last line is empty
- Already initialized constant warnings under Ruby 2.3.1 HOT 4
- new release HOT 4
- VI in Rails Console HOT 2
- rb-readline (0.5.3) crashes on mac_os_x / 2.3.1p112 HOT 1
- "\r" being displayed after hitting enter in rb-readline on Arch HOT 2
- Invalid byte sequence in UTF-8 when running console HOT 5
- issue deploying rails 5 application to AWS using Elastic Beanstalk due to rb-readline HOT 5
- RbReadline.rl_insert_text can not insert Chinese characters
- Officially support JRuby HOT 2
- ArgumentError when case insensitive matching is active HOT 1
- Add support for Readline.vi_editing_mode? & Readline.emacs_editing_mode? HOT 1
- Tests are randomly failing
- Using rb-readline in Windows with cygwin/mintty/git for Windows doesn't work
- Rb-readline causes the rails console to use the keyboard "↑" after typing Chinese and cannot load Chinese
- Fails when $TERM=xterm HOT 4
- Broken support for special prefixes HOT 1
- `Readline::HISTORY.delete_at(index)` not working for indices of negative values
- Encoding::UndefinedConversionError for UTF-8 to ASCII8
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 rb-readline.