[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:01773] Re: $stdin and DATA

From: matz@... (Yukihiro Matsumoto)
Date: 2000-03-07 08:38:43 UTC
List: ruby-talk #1773
Hi,

In message "[ruby-talk:01770] $stdin and DATA"
    on 00/03/06, Dave Thomas <Dave@thomases.com> writes:

|This worked fine. However, to make the changeover between test and
|production easier, I thought I'd be clever:
|
|   $stdin = DATA
|   while gets
|     # ...
|   end
|   __END__
|   stuff...
|
|But this doesn't seem to work.

It's caused by the internal buffer of stdin.  I changed $stdin switch
strategy to ensure already read buffer not disposed.

The latest commit contains huge modify (:sym to be Symbol object).
Handle with care.  And tell if you find bugs.

							matz.

In This Thread

Prev Next