-
Notifications
You must be signed in to change notification settings - Fork 57
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
Ruboto IRB console doesn't accept input #32
Comments
I would like to try to solve the problem, can anyone please tell me where to start or how to approach it? |
Right now this is the result of trying to store input in a variable: #Ruboto IRB
>>input = gets
=>nil
>>puts input
=>
nil I want the IRB to simply wait for input and only then continue. #Ruboto IRB
>>input = gets
hey
=>nil
>>puts input
=> hey
nil |
OK, so you basically want STDIN to read from the Ruboto IRB command line, right? |
Basically yeah, what causes the code right now to skip the command? And if I want to add the feature where should I start? |
The Ruboto IRB command line is not the console (STDIN). It is just a regular UI Text component. You need to change the behaviour of either #gets or STDIN to read input from either the Ruboto IRB input field or maybe a popup input dialog. |
I think I will try to change the #gets behavior to read from the input field and, what file is the file that dictates each method's behavior? I still don't know very well how the Ruboto repository is built and what folders contain which files I couldn't find it at src\folder of neither IRB nor Ruboto repository. |
The behaviour of #gets is defined by the Ruby implementation, that is JRuby. We should not change that, but rather override it like you can in Ruby. I think the method to override is Kernel#gets. |
Any progress on this? It's not major, as I can always just define the input on the script and just rerun. Either way, it's be nice |
i have the same problem but mine display nameerror. how do i solve that |
When launching a script with a line such as
'input = gets' the console just ignores the line as if it is an empty variable declaration, no error/message is thrown whatsoever.
The text was updated successfully, but these errors were encountered: