Nano : Array#each_permutation

(Jeff Wood) #1

More fun with nano.

Running Ruby 1.8.2-15 under windows.

I have the nano gem 0.8.2 installed.

trying the following under irb:

require 'nano/full'

gives back an error:

LoadError: No such file to load -- nano/float/approx?

... apparently coming from line 95 of nano/full.rb

Additionally, trying to do the following under irb:

require 'nano/array'
require 'nano/enumerable'

a = %w( a b c d e )
puts a.each_permutation

gives back an error:

NoMethodError: undefined method 'permute' for ["b","c","d","e","f"]:Array
    from .../nano/enumerable/each_permutation.rb:28 : in 'each_permutation'

I did check docs and I just don't see what I'm doing wrong... Any enlightenment?

(7rans) #2

Hi Jeff,

Looks like you found a couple of bugs. I will fixed shortly. Thanks.

T.