Max Katz (1) [Avatar] Offline
#1
# Do all states include a space?
>> states.keys.all? {|state, abbr| state =~ / / }
=> false


This example shows there being two values yielded to the block, but because you have called #keys on the hash, the block for #all? should only receive one value yielded (state in this case).