why does this not blow up?

cfp:~ > cat a.rb
require 'yaml'

factor = 100000000000000000

soft, hard = Process.getrlimit Process::RLIMIT_RSS
y 'soft' => soft, 'hard' => hard

Process.setrlimit Process::RLIMIT_RSS, soft/factor, hard/factor

soft, hard = Process.getrlimit Process::RLIMIT_RSS
y 'soft' => soft, 'hard' => hard

s = 42.chr * (soft + 1)
s[-1]


cfp:~ > sudo ruby a.rb; echo $?
---
hard: 9223372036854775807
soft: 9223372036854775807
---
hard: 92
soft: 92
0


i sort of expect this to get signaled and throw an exception?

cheers

a @ http://drawohara.com/
--
sleep is the best meditation.
h.h. the 14th dalai lama