[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

gnu readline ruby vs. perl

Wybo Dekker

6/9/2005 10:20:00 PM

3 Answers

Yukihiro Matsumoto

6/9/2005 11:43:00 PM

0

Hi,

In message "Re: gnu readline ruby vs. perl"
on Fri, 10 Jun 2005 07:19:45 +0900, Wybo Dekker <wybo@servalys.nl> writes:

|I'm translating a Perl script into Ruby, but can't reproduce a readline
|action. I made two, hopefully equivalent, test scripts in Perl and Ruby,
|but they behave differently.

Ruby's readline takes input from stdin. Perhaps Perls takes from
/dev/tty, or something. Any information is welcome.

matz.


Nakada, Nobuyoshi

6/10/2005 2:22:00 AM

0

Hi,

At Fri, 10 Jun 2005 07:19:45 +0900,
Wybo Dekker wrote in [ruby-talk:145011]:
> Its test run does not exit with a return - it needs ctrl-C:
>
> $ echo test |readlineruby
> 1 lines
> type return to quit:
> ./readlineruby:10:in `readline': Interrupt
> from ./readlineruby:10
> $

The test exited immediately after printing the prompt, on my box.
What are your platform, ruby and readline versions?

--
Nobu Nakada


Gyoung-Yoon Noh

6/10/2005 3:36:00 AM

0

On 6/10/05, nobuyoshi nakada <nobuyoshi.nakada@ge.com> wrote:
> The test exited immediately after printing the prompt, on my box.
> What are your platform, ruby and readline versions?
>

I've experienced same problem with OP.

$ ldd /usr/lib/ruby/1.8/i686-linux/readline.so | grep readline
libreadline.so.4 => /lib/libreadline.so.4 (0xb7f00000)
$ ruby -v
ruby 1.8.2 (2004-12-25) [i686-linux]

Same on the 1.9 (March).

--
http://nohmad.su...