Sometimes in a foreign language, you will see a word that has some meaning to you in your native language. Often, these will be cognates and have the same meaning in the foreign language, such as 'green' and 'grün' in German. Sometimes it can have a completely different meaning, such as 'bad', (which means bath in German). These are commonly called false friends.
It's similar with programming languages, some familiar constructs will work exactly the same as you expect. Some wont work at all, and in some cases, they'll sort of work.
In Ruby, if you're like me and come from a C, Unix or PHP background, one of the first things to trip you up will be ARGV.
In PHP ARGV works like this:
<?php // test.php echo $_SERVER['argv'] ?> $ php test.php 1234 > test.php
C and BASH work the same way.
Ruby does things a different (PERL) way:
#!/usr/bin/env ruby # file test.rb puts ARGV $ ruby test.rb helloworld > helloworld
The difference is, in PHP, C, BASH the first element of ARGV is the program's name. In Ruby, and in PERL, it is the first argument passed into the program.
I'm trying to think which makes more sense, probably the Ruby/PERL implementation. I'm used to starting at index 1 though. So just bear in mind that even though constructs may be similar between languages, there is some devil in the detail.