# Ruby pipe with arguments error

**URL:** <https://www.ruby-forum.com/t/ruby-pipe-with-arguments-error/49737>\
**Category:** Ruby\
**Created:** [December 8, 2005, 5:18am UTC](https://www.ruby-forum.com/t/ruby-pipe-with-arguments-error/49737 "2005-12-08T05:18:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![capitain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/54ee81/32.png) [@capitain](https://www.ruby-forum.com/u/capitain)\
**Post date:** [December 8, 2005, 5:18am UTC](https://www.ruby-forum.com/t/ruby-pipe-with-arguments-error/49737/1 "2005-12-08T05:18:19Z")

</div>

## i am newbie of ruby , but i met a strange problem when use

## #echo hello |ruby -ve ‘puts ARGF.readlines’ ruby 1.8.3 (2005-09-21) [i686-linux] hello

it’s ok

## but when i append a argument with pipe

# echo hello |ruby -ve ‘puts ARGF.readlines’ somearg

## ruby 1.8.3 (2005-09-21) [i686-linux] -e:1:in `readlines’: No such file or directory - somearg (Errno::ENOENT) from -e:1

why ruby say ‘no such file or diectory’? can anyboby explain it?

thanks

---

<div class="post-metadata">

**Author:** ![capitain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/54ee81/32.png) [@capitain](https://www.ruby-forum.com/u/capitain)\
**Post date:** [December 8, 2005, 8:37am UTC](https://www.ruby-forum.com/t/ruby-pipe-with-arguments-error/49737/2 "2005-12-08T08:37:36Z")

</div>

Hi,

At Thu, 8 Dec 2005 13:17:35 +0900,  
cap wrote in [ruby-talk:169506]:

> why ruby say ‘no such file or diectory’? can anyboby explain it?

ARGF doesn’t equal STDIN.

Quotation from the document:

- The global constant ARGF (also accessible as $\<) provides an
- IO-like stream which allows access to all files mentioned on the
- command line (or STDIN if no files are mentioned).
