JEG2 / highline

A higher level command-line oriented interface.
Other
1.29k stars 137 forks source link

Use the configured streams on JRuby with JLine #67

Closed rsutphin closed 11 years ago

rsutphin commented 11 years ago

Without this change, the input and output parameters to HighLine.new are ignored for #ask (both for specifying the input stream and for displaying the prompt).

This addresses issue #31, though not completely — while it allows the tests to run on JRuby, many of them fail.

With this patch applied, the tests run to completion on JRuby 1.7.3:

94 tests, 743 assertions, 22 failures, 1 errors, 0 skips

On JRuby 1.6.8, they get further than they do without the patch, but many of them error out (as opposed to failing). The test run slows and eventually hangs before completing. The problem on 1.6.8 seems to be that the runner is running out of heap space.

For both JRuby 1.7.3 and 1.6.8, though, HighLine does better with this patch than without it so I'm submitting it for review.