I am investigating a similar "cannot allocate memory issue".
In order to reproduce the problem I created this simple gist:

https://gist.github.com/adamniedzielski/8635539

I am running this on Ubuntu x64 with 8 GB RAM memory.

The strategy is simple: allocate much memory by creating huge array and
try to use backtick operator or system method.

You will have to adjust the big number in such a way that the Ruby
process takes more memory than the amount of free memory in your system.

In my case the script will output:

system fails
ls fails

I tested it on Ruby 1.9.3, 2.0.0, 2.1.0

-- 
Posted via http://www.ruby-forum.com/.