History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-1335
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Charles Oliver Nutter
Reporter: Chris Cheetham
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
JRuby

"gets" method in jirb does not echo to stdout

Created: 10/Sep/07 10:23 AM   Updated: 22/Dec/07 06:28 AM
Component/s: None
Affects Version/s: JRuby 1.0.0, JRuby 1.0.1
Fix Version/s: JRuby 1.1b1, JRuby 1.0.2

Time Tracking:
Not Specified

File Attachments: 1. Text File echo-fix.patch (0.7 kb)

Environment:
Mac OS X 10.4.10, Java 1.5.0_07-87, 1.6.0-dp-b88-34
Solaris SPARC Generic_120011-14 (Sol10u4), Java 1.6.0_02-b05



 Description  « Hide
Method "gets" when run in jirb does not echo stdin to stdout. E.g.,

typed = gets
puts "you typed #{typed}"

does not echo what the user types until the user hits ENTER.

Worth noting that as compared to native/MRI ruby, when the above is run within the jruby interpreter there is a discernible delay from when ENTER is hit to when "gets" returns.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Damian Steer - 11/Sep/07 05:22 AM
I think this fixes the problem, but I've only tried it on linux. Please test!

The strange pause is unrelated, and fixed in trunk (at least I'm not seeing it).


Chris Cheetham - 12/Sep/07 12:23 AM
Verified ...
http://svn.codehaus.org/jruby/trunk/jruby, r4307
Solaris snv_70, x86_64, java 1.6.0_02

FWIW, on the platform/JRuby version, I did not see any discernible delay.


Chris Cheetham - 12/Sep/07 12:25 AM
(... to be clear, I verified after applying Damian's attached patch.)

Charles Oliver Nutter - 19/Oct/07 09:42 PM
Fixed on trunk and 1.0 branch. Thanks!