UWE-Ruby/week-03 — Issue #3: change assignment to comparison
Author: mungruby
Created: 2011-10-17 19:15:24+00:00
State: open

: 04_or_spec.rb

C:\projects\ruby\cp110a\week-03>rspec spec/04_or_spec.rb --format d
C:/projects/ruby/cp110a/week-03/spec/04_or_spec.rb:39: warning: found = in conditional, should be ==

Is this statement written as intended?

if default_superhero_index = subject.index(:green_lantern) or default_superhero_index = 0

I don't see how the test demonstrates that the statement to the right of the * or * is not being evaluated.