jeremyevans/ruby-subset_sum — Issue #1: Wrong result for c extension code
Author: aserafin
Created: 2012-01-14 23:07:02+00:00
State: open

I've noticed bug when code is executed with c extension mode:

```ruby
values = [60, 20, 15, -68, -12]
want = 0

results = SubsetSum.subset_sum(values, want, nil)
puts results.inspect # => []
```

while forcing to use pure ruby version it returns valid result

```ruby
values = [60.to_f, 20.to_f, 15.to_f, -68.to_f, -12.to_f]
want = 0

results = SubsetSum.subset_sum(values, want, nil)
puts results.inspect => [60, 20, -68 -12]

```