<p>I'm new to Ruby, and I'm trying the following:  </p>

<pre><code>mySet = numOfCuts.times.map{ rand(seqLength) }
</code></pre>

<p>but I get the 'yield called out of block' error. I'm not sure what his means. BTW, this question is part of a more general question I asked <a href="https://stackoverflow.com/questions/119107/how-do-i-generate-a-list-of-n-unique-random-numbers-in-ruby"><strong>here</strong></a>.</p>

if   "numOfCuts" is an integer,
```
```
5.times.foo
```
```
is invalid
"times" expects a block.
```
```
5.times{   code here   }
```
```