From: matz@... (Yukihiro Matsumoto) Date: 2000-03-07T17:38:43+09:00 Subject: [ruby-talk:01773] Re: $stdin and DATA Hi, In message "[ruby-talk:01770] $stdin and DATA" on 00/03/06, Dave Thomas 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.