Reputation: 9418
If I run code like this, I get - in the __FILE__ var:
-
__FILE__
cat script.rb | ruby
I can't find that documented anywhere though (docs). Where can I get exact details about it?
Upvotes: 0
Views: 47
Reputation: 1511
- is sometimes used to refer to STDIN. This is a unix thing, and not unique to ruby.
STDIN
Described a little bit here