Ross Bamford
11/6/2006 12:14:00 PM
On Mon, 2006-11-06 at 11:27 +0900, Daniel Martin wrote:
> Note that the creator of this quiz left out one important case from
> their tests:
>
> def test_02a
> assert_equal [2**1**2], Interpreter.new(Compiler.compile('2**1**2')).run
> end
>
> This tests that your compiler is properly making **
> right-associative. Some solutions already posted fail this test.
>
Phew - I expected I'd left out far more than just one important case :).
Seriously though, good catch - thanks. It looks like all the solutions
so far are passing it now.
> 2**2**2 was an unfortunate test case to choose, since 2**4 == 4**2.
>
Ahem. Oops. :)
--
Ross Bamford - rosco@roscopeco.REMOVE.co.uk